Commit 2f15e386 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

sort output by total size.

parent 26c4aaeb
...@@ -48,7 +48,7 @@ def report(rep): ...@@ -48,7 +48,7 @@ def report(rep):
print fmt % ("Class Name", "Count", "TBytes", "Pct", "AvgSize") print fmt % ("Class Name", "Count", "TBytes", "Pct", "AvgSize")
print fmt % ('-'*46, '-'*7, '-'*9, '-'*5, '-'*7) print fmt % ('-'*46, '-'*7, '-'*9, '-'*5, '-'*7)
typemap = rep.TYPEMAP.keys() typemap = rep.TYPEMAP.keys()
typemap.sort() typemap.sort(key=lambda a:rep.TYPESIZE[a])
cumpct = 0.0 cumpct = 0.0
for t in typemap: for t in typemap:
pct = rep.TYPESIZE[t] * 100.0 / rep.DBYTES pct = rep.TYPESIZE[t] * 100.0 / rep.DBYTES
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment