Commit 8bbb38ae authored by Jasper Chapman-Black's avatar Jasper Chapman-Black Committed by Commit Bot

SuperSize: Add upload bash snippet to html_report

Bug: 1007516
Change-Id: I78e65968c63d9665dc4e77756b863b2fdfe74e6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824017Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Auto-Submit: Jasper Chapman-Black <jaspercb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699805}
parent 5724a4fc
......@@ -4,12 +4,15 @@
"""Creates an html report that allows you to view binary size by component."""
from __future__ import print_function
import codecs
import collections
import itertools
import json
import logging
import os
import uuid
import archive
import diff
......@@ -281,13 +284,21 @@ def Run(args, parser):
BuildReportFromSizeInfo(
args.output_report_file, size_info, all_symbols=args.all_symbols)
logging.warning('Done!')
msg = [
'Done!',
'View using a local server via: ',
' %s start_server %s',
'or upload to the hosted version here:',
' {0} start_server {1}',
'or run:',
' gsutil.py cp -a public-read {1} gs://chrome-supersize/oneoffs/'
'{2}.ndjson',
' to view at:',
' https://storage.googleapis.com/chrome-supersize/viewer.html'
]
'?load_url=oneoffs/{2}.ndjson',
]
supersize_path = os.path.relpath(os.path.join(
path_util.SRC_ROOT, 'tools', 'binary_size', 'supersize'))
logging.warning('\n'.join(msg), supersize_path, args.output_report_file)
# Use a random UUID as the filename so user can copy-and-paste command
# directly without a name collision.
upload_id = uuid.uuid4()
print('\n'.join(msg).format(supersize_path, args.output_report_file,
upload_id))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment