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

Unified Diff: tools/binary_size/diagnose_bloat.py

Issue 2884283002: supersize: Fix diff logic for changed vs unchanged of groups (Closed)
Patch Set: 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/describe.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/binary_size/diagnose_bloat.py
diff --git a/tools/binary_size/diagnose_bloat.py b/tools/binary_size/diagnose_bloat.py
index dd7109ed67feded2e5ad115f667fb479745d45d9..14923b53e1204607038fbc2ef09df8ec88de63d6 100755
--- a/tools/binary_size/diagnose_bloat.py
+++ b/tools/binary_size/diagnose_bloat.py
@@ -77,9 +77,7 @@ class BaseDiff(object):
class NativeDiff(BaseDiff):
- _RE_SUMMARY = re.compile(
- r'.*(Section Sizes .*? object files added, \d+ removed).*',
- flags=re.DOTALL)
+ _RE_SUMMARY = re.compile(r'Section Sizes .*?\n\n.*?(?=\n\n)', flags=re.DOTALL)
_RE_SUMMARY_STAT = re.compile(
r'Section Sizes \(Total=(?P<value>\d+) (?P<units>\w+)\)')
_SUMMARY_STAT_NAME = 'Native Library Delta'
@@ -102,7 +100,7 @@ class NativeDiff(BaseDiff):
return self._diff.splitlines()
def Summary(self):
- return NativeDiff._RE_SUMMARY.match(self._diff).group(1)
+ return NativeDiff._RE_SUMMARY.search(self._diff).group()
def ProduceDiff(self, before_dir, after_dir):
before_size = os.path.join(before_dir, self._size_name)
« no previous file with comments | « no previous file | tools/binary_size/libsupersize/describe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698