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

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

Issue 132233017: Fix bug in binary_size script and cosmetic updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 | « tools/binary_size/README.txt ('k') | tools/binary_size/template/index.html » ('j') | 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/python 1 #!/usr/bin/python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 """Generate a spatial analysis against an arbitrary library. 6 """Generate a spatial analysis against an arbitrary library.
7 7
8 To use, build the 'binary_size_tool' target. Then run this tool, passing 8 To use, build the 'binary_size_tool' target. Then run this tool, passing
9 in the location of the library to be analyzed along with any other options 9 in the location of the library to be analyzed along with any other options
10 you desire. 10 you desire.
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 os.path.join(opts.destdir, 'largest-symbols.js'), 100) 469 os.path.join(opts.destdir, 'largest-symbols.js'), 100)
470 DumpLargestSources(symbols, 470 DumpLargestSources(symbols,
471 os.path.join(opts.destdir, 'largest-sources.js'), 100) 471 os.path.join(opts.destdir, 'largest-sources.js'), 100)
472 DumpLargestVTables(symbols, 472 DumpLargestVTables(symbols,
473 os.path.join(opts.destdir, 'largest-vtables.js'), 100) 473 os.path.join(opts.destdir, 'largest-vtables.js'), 100)
474 474
475 # TODO(andrewhayden): Switch to D3 for greater flexibility 475 # TODO(andrewhayden): Switch to D3 for greater flexibility
476 treemap_out = os.path.join(opts.destdir, 'webtreemap') 476 treemap_out = os.path.join(opts.destdir, 'webtreemap')
477 if not os.path.exists(treemap_out): 477 if not os.path.exists(treemap_out):
478 os.makedirs(treemap_out, 0755) 478 os.makedirs(treemap_out, 0755)
479 treemap_src = os.path.join('third_party', 'webtreemap', 'src', 479 treemap_src = os.path.join('third_party', 'webtreemap', 'src')
480 'webtreemap-gh-pages')
481 shutil.copy(os.path.join(treemap_src, 'COPYING'), treemap_out) 480 shutil.copy(os.path.join(treemap_src, 'COPYING'), treemap_out)
482 shutil.copy(os.path.join(treemap_src, 'webtreemap.js'), treemap_out) 481 shutil.copy(os.path.join(treemap_src, 'webtreemap.js'), treemap_out)
483 shutil.copy(os.path.join(treemap_src, 'webtreemap.css'), treemap_out) 482 shutil.copy(os.path.join(treemap_src, 'webtreemap.css'), treemap_out)
484 shutil.copy(os.path.join('tools', 'binary_size', 'template', 'index.html'), 483 shutil.copy(os.path.join('tools', 'binary_size', 'template', 'index.html'),
485 opts.destdir) 484 opts.destdir)
486 if opts.verbose: 485 if opts.verbose:
487 print 'Report saved to ' + opts.destdir + '/index.html' 486 print 'Report saved to ' + opts.destdir + '/index.html'
488 487
489 488
490 if __name__ == '__main__': 489 if __name__ == '__main__':
491 sys.exit(main()) 490 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/binary_size/README.txt ('k') | tools/binary_size/template/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698