File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -207,15 +207,20 @@ def print_summary(self, section_size):
207
207
names .extend ([c [0 ] for c in self .category_mangled_matching ])
208
208
names .append ('Unknown' )
209
209
total_size = 0
210
+ sorted_categories = []
210
211
for name in names :
211
212
category = self .categories .get (name )
212
213
size = 0
213
214
if category :
214
215
size = category .size
215
216
total_size += size
216
217
if size > 0 :
217
- print ("%60s: %8d (%6.2f%%)" %
218
- (name , size , (float (size ) * 100 ) / section_size ))
218
+ sorted_categories .append (
219
+ (name , size , (float (size ) * 100 ) / section_size ))
220
+ sorted_categories .sort (key = lambda entry : entry [1 ], reverse = True )
221
+ for category in sorted_categories :
222
+ print ("%60s: %8d (%6.2f%%)" %
223
+ (category [0 ], category [1 ], category [2 ]))
219
224
print ("%60s: %8d (%6.2f%%)" % ('TOTAL' , total_size , float (100 )))
220
225
221
226
def uncatorizedSymbols (self ):
You can’t perform that action at this time.
0 commit comments