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

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

Issue 2924343004: supersize: Fix path counts, missing section in clusters (Closed)
Patch Set: Created 3 years, 6 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/diff.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/libsupersize/describe.py
diff --git a/tools/binary_size/libsupersize/describe.py b/tools/binary_size/libsupersize/describe.py
index ad0412950869697b6604298742eb4af55e0a243d..0f0df183187f714d86f9320b2ccb0f1cd5b48867 100644
--- a/tools/binary_size/libsupersize/describe.py
+++ b/tools/binary_size/libsupersize/describe.py
@@ -200,15 +200,20 @@ class Describer(object):
if s.IsGroup():
helper(s)
else:
- status = group.DiffStatus(s)
- paths_by_status[status].add(s.source_path or s.object_path)
+ path = s.source_path or s.object_path
+ # Ignore paths like foo/{shared}/2
+ if '{' not in path:
+ paths_by_status[group.DiffStatus(s)].add(path)
helper(diff)
# Show only paths that have no changed symbols (pure adds / removes).
unchanged, changed, added, removed = paths_by_status
+ changed.update(added.intersection(removed))
estevenson 2017/06/09 22:30:19 nit: can you maybe add a comment above all the upd
agrieve 2017/06/12 14:37:17 Done.
added.difference_update(unchanged)
added.difference_update(changed)
+ added.difference_update(removed)
removed.difference_update(unchanged)
removed.difference_update(changed)
+ removed.difference_update(added)
yield '{} paths added, {} removed, {} changed'.format(
len(added), len(removed), len(changed))
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/diff.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698