Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: tools/binary_size/libsupersize/canned_queries.py

Issue 2888693002: supersize: Add Print(idx). Sort subgroups in canned_queries. (Closed)
Patch Set: supersize: Add Print(idx). Sort subgroups in canned_queries. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/console.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/canned_queries.py
diff --git a/tools/binary_size/libsupersize/canned_queries.py b/tools/binary_size/libsupersize/canned_queries.py
index 8ee80cc6693b0276aed77e6699c7c7feff6821ee..7785da3315f66d90733e222481e2639f46e1d110 100644
--- a/tools/binary_size/libsupersize/canned_queries.py
+++ b/tools/binary_size/libsupersize/canned_queries.py
@@ -14,8 +14,9 @@ class _Grouper(object):
def Add(self, name, group):
logging.debug('Computed %s', name)
- group.name = name
- self.groups.append(group)
+ sorted_group = group.Sorted()
+ sorted_group.SetName(name)
+ self.groups.append(sorted_group)
return group.Inverted()
def Finalize(self, remaining):
@@ -24,9 +25,10 @@ class _Grouper(object):
stars = remaining.Filter(lambda s: s.name.startswith('*'))
if stars:
remaining = stars.Inverted()
- stars.name = '** Merged Symbols'
+ stars = stars.Sorted()
+ stars.SetName('** Merged Symbols')
self.groups.append(stars)
- remaining.name = 'Other'
+ remaining.SetName('Other')
self.groups.append(remaining)
logging.debug('Finalized')
@@ -143,5 +145,6 @@ class CannedQueries(object):
def TemplatesByName(self, symbols=None, depth=0):
"""Lists C++ templates grouped by name."""
symbols = self._SymbolsArg(symbols)
+ # Call Sorted() twice so that subgroups will be sorted.
# TODO(agrieve): Might be nice to recursively GroupedByName() on these.
- return symbols.WhereIsTemplate().GroupedByName(depth).Sorted()
+ return symbols.WhereIsTemplate().Sorted().GroupedByName(depth).Sorted()
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/console.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698