Commit 0cecb6ce authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

SuperSize: Add webview to milestone reports and use non-full reports

The non-full reports capture about the same info and load much faster.
We can always switch them back, but thought it's worth trying them for a
while to see if there are any drawbacks.

Also adds a note about opening the viewer directly for uploading files.

Results of this commit are already pushed to
https://storage.googleapis.com/chrome-supersize/index.html

Bug: 880671
Change-Id: I79f1b2298658cde0564c5976f47382e930f7196a
Reviewed-on: https://chromium-review.googlesource.com/c/1281174
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599821}
parent 467bd6d1
......@@ -46,11 +46,10 @@ REPORT_URL_TEMPLATE_VIEW = '{cpu}/{apk}/report_{version2}.ndjson'
REPORT_URL_TEMPLATE_COMP = '{cpu}/{apk}/report_{version1}_{version2}.ndjson'
DESIRED_CPUS = ['arm', 'arm_64']
# TODO: Add AndroidWebview.apk
DESIRED_APKS = ['Monochrome.apk', 'ChromeModern.apk']
DESIRED_APKS = ['Monochrome.apk', 'ChromeModern.apk', 'AndroidWebview.apk']
# Versions are manually gathered from
# https://omahaproxy.appspot.com/history?os=android&channel=stable
DESIRED_VERSION = [
DESIRED_VERSIONS = [
'60.0.3112.116',
'61.0.3163.98',
'62.0.3202.84',
......@@ -62,9 +61,17 @@ DESIRED_VERSION = [
'68.0.3440.85',
'69.0.3497.91',
'70.0.3538.17', # Beta
'71.0.3574.0', # Dev
]
def _GetDesiredVersions(apk):
if apk != 'AndroidWebview.apk':
return DESIRED_VERSIONS
# Webview .size files do not exist before M71.
return [v for v in DESIRED_VERSIONS if int(v.split('.')[0]) >= 71]
class Report(collections.namedtuple(
'Report', ['cpu', 'apk', 'version1', 'version2'])):
PUSH_URL_REGEX_VIEW = re.compile((PUSH_URL + REPORT_URL_TEMPLATE_VIEW).format(
......@@ -122,10 +129,11 @@ def _SizeInfoFromGsPath(path):
def _PossibleReportFiles():
cpu_and_apk_combos = list(itertools.product(DESIRED_CPUS, DESIRED_APKS))
for cpu, apk in cpu_and_apk_combos:
for version2 in DESIRED_VERSION:
apk_versions = _GetDesiredVersions(apk)
for version2 in apk_versions:
yield Report(cpu, apk, None, version2)
for i, version1 in enumerate(DESIRED_VERSION):
for version2 in DESIRED_VERSION[i + 1:]:
for i, version1 in enumerate(apk_versions):
for version2 in apk_versions[i + 1:]:
yield Report(cpu, apk, version1, version2)
......@@ -136,7 +144,7 @@ def _SetPushedReports(directory):
'pushed': {
'cpu': DESIRED_CPUS,
'apk': DESIRED_APKS,
'version': DESIRED_VERSION,
'version': DESIRED_VERSIONS,
},
}
json.dump(pushed_reports_obj, out_file)
......@@ -171,7 +179,7 @@ def _BuildReport(paths):
if before_size_path:
size_info = diff.Diff(_SizeInfoFromGsPath(before_size_path), size_info)
html_report.BuildReportFromSizeInfo(outpath, size_info, all_symbols=True)
html_report.BuildReportFromSizeInfo(outpath, size_info, all_symbols=False)
return outpath
......
......@@ -170,6 +170,8 @@ function isGreaterOrEqual(v1, v2) {
Open report
</button>
<div class="msg-bad-compare">Version 1 must be older than Version 2</div>
<div style="margin:20pt 0 10pt"><b>Note:</b> AndroidWebview.apk size information exists only for M71 and above.</div>
<div>To upload your own .ndjson file, use the upload button within <a href="viewer.html">the viewer</a>.</div>
</form>
</body>
......
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