viewing-and-analyzing: simplify Python example
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 18 Oct 2014 01:22:55 +0000 (21:22 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 18 Oct 2014 01:25:40 +0000 (21:25 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
contents/getting-started/viewing-and-analyzing.md

index 72255e74eb6487220fc758f1f891387a568822a4..e49cc5a0c464010d09797e2df18f4088e7496a9e 100644 (file)
@@ -130,7 +130,7 @@ def top5proc():
         last_ts = cur_ts
 
     # display top 10
-    for name, ns in exec_times.most_common()[:5]:
+    for name, ns in exec_times.most_common(5):
         s = ns / 1000000000
         print('{:20}{} s'.format(name, s))
 
This page took 0.02287 seconds and 4 git commands to generate.