[pypy-commit] pypy default: improve the summary

fijal noreply at buildbot.pypy.org
Tue Aug 2 14:55:52 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r46201:c979c6ab3437
Date: 2011-08-02 14:56 +0200
http://bitbucket.org/pypy/pypy/changeset/c979c6ab3437/

Log:	improve the summary

diff --git a/pypy/tool/logparser.py b/pypy/tool/logparser.py
--- a/pypy/tool/logparser.py
+++ b/pypy/tool/logparser.py
@@ -392,9 +392,12 @@
         outfile = open(out, "w")
     l = totaltimes.items()
     l.sort(cmp=lambda a, b: cmp(b[1], a[1]))
-    for a, b in l[1:]:
+    total = sum([b for a, b in l])
+    for a, b in l:
+        if a is None:
+            a = 'interpret'
         s = " " * (50 - len(a))
-        print >>outfile, a, s, str(b*100/l[0][1]) + "%"
+        print >>outfile, a, s, str(b*100/total) + "%"
     if out != '-':
         outfile.close()
 


More information about the pypy-commit mailing list