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

Side by Side Diff: tools/binary_size/diagnose_bloat.py

Issue 2886963002: diagnose_bloat: Remove period in "See detailed diff" message (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2017 The Chromium Authors. All rights reserved. 2 # Copyright 2017 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tool for finding the cause of binary size bloat. 6 """Tool for finding the cause of binary size bloat.
7 7
8 See //tools/binary_size/README.md for example usage. 8 See //tools/binary_size/README.md for example usage.
9 9
10 Note: this tool will perform gclient sync/git checkout on your local repo if 10 Note: this tool will perform gclient sync/git checkout on your local repo if
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 if metadata.Exists(): 366 if metadata.Exists():
367 logging.info( 367 logging.info(
368 'Skipping diff for %s and %s. Matching diff already exists: %s', 368 'Skipping diff for %s and %s. Matching diff already exists: %s',
369 before.rev, after.rev, diff_path) 369 before.rev, after.rev, diff_path)
370 else: 370 else:
371 if os.path.exists(diff_path): 371 if os.path.exists(diff_path):
372 os.remove(diff_path) 372 os.remove(diff_path)
373 with open(diff_path, 'a') as diff_file: 373 with open(diff_path, 'a') as diff_file:
374 for d in self.diffs: 374 for d in self.diffs:
375 d.RunDiff(diff_file, before.dir, after.dir) 375 d.RunDiff(diff_file, before.dir, after.dir)
376 logging.info('See detailed diff results here: %s.', diff_path) 376 logging.info('See detailed diff results here: %s', diff_path)
377 metadata.Write() 377 metadata.Write()
378 self._AddDiffSummaryStat(before, after) 378 self._AddDiffSummaryStat(before, after)
379 379
380 def Summarize(self): 380 def Summarize(self):
381 if self._summary_stats: 381 if self._summary_stats:
382 path = os.path.join(self.archive_dir, 'last_diff_summary.txt') 382 path = os.path.join(self.archive_dir, 'last_diff_summary.txt')
383 with open(path, 'w') as f: 383 with open(path, 'w') as f:
384 stats = sorted( 384 stats = sorted(
385 self._summary_stats, key=lambda x: x[0].value, reverse=True) 385 self._summary_stats, key=lambda x: x[0].value, reverse=True)
386 _PrintAndWriteToFile(f, '\nDiff Summary') 386 _PrintAndWriteToFile(f, '\nDiff Summary')
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 804
805 if i != 0: 805 if i != 0:
806 diff_mngr.MaybeDiff(i - 1, i) 806 diff_mngr.MaybeDiff(i - 1, i)
807 807
808 diff_mngr.Summarize() 808 diff_mngr.Summarize()
809 809
810 810
811 if __name__ == '__main__': 811 if __name__ == '__main__':
812 sys.exit(main()) 812 sys.exit(main())
813 813
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698