Author: Maciej Fijalkowski <fij...@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() _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit