[pypy-svn] r59862 - pypy/trunk/pypy/translator/tool
antocuni at codespeak.net
antocuni at codespeak.net
Tue Nov 11 14:32:10 CET 2008
Author: antocuni
Date: Tue Nov 11 14:32:10 2008
New Revision: 59862
Modified:
pypy/trunk/pypy/translator/tool/staticsizereport.py
Log:
print the total size of all the objects displayed
Modified: pypy/trunk/pypy/translator/tool/staticsizereport.py
==============================================================================
--- pypy/trunk/pypy/translator/tool/staticsizereport.py (original)
+++ pypy/trunk/pypy/translator/tool/staticsizereport.py Tue Nov 11 14:32:10 2008
@@ -212,11 +212,12 @@
info = pickle.load(f)
f.close()
reports = getattr(info, kind)
-
+ globalsize = 0
for report in reports:
if report.totalsize == 0:
continue
size = format_size(report.totalsize, human_readable)
+ globalsize += report.totalsize
if summary:
print "%d\t%s" % (size, report.modulename)
else:
@@ -225,6 +226,8 @@
for typereport in report.typereports:
print format_typereport(typereport, human_readable)
print
+ print
+ print 'Total size:', format_size(globalsize, human_readable)
if show_unknown_graphs:
print
More information about the Pypy-commit
mailing list