New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 695188 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 697221


Participants' hotlists:
speed-binarysize-backlog


Sign in to add a comment

Measure apk patch size

Project Member Reported by agrieve@chromium.org, Feb 22 2017

Issue description

There exists a tool for estimating an apk's patch size:
https://github.com/googlesamples/apk-patch-size-estimator

It would be great to use this tool in order to catch any large jumps in patch size.

The trickiest thing about doing this is choosing the reference point. Options:
1. Store baseline in googlestorage, and download it via gclient hook
2. Store baseline in googlestorage, and download it via recipe

We'll also need to remember to update the hash for each milestone.


This will measure the patch size for users that always upgrade (e.g. always upgrading from the previous version). I think that's a good start though.

For this to not be too annoying, we should choose just one .apk to measure. I'd guess this should be MonochromePublic.apk, as it's the most all-encompassing.
 
Cc: nyquist@chromium.org
+nyquist@ who did a little work to do this analysis in a semi-automated fashion (in sheets/), he can probably link it here if you'd like.  Concur that this would be a good start and evaluating Monochrome SGTM as it'll pick up increases in Chrome or WebView.
We talked a bit offline about this, but I believe we would have to do most of this work ourselves.
Owner: estevenson@chromium.org
Downloading the reference APK via gclient hook seems like a better option than downloading it on every single bot run. 

Since the patch size aims to measure the size shipped to users it probably also makes sense to try to get this running on official builders right?
IMO official builders are a distant second in terms of priority. Although they would reflect reality, just having this run against ChromePublic.apk will be far more actionable (for the same reason we alert against MonochromePublic.apk - per-commit granularity)
So is the plan to compare against the latest stable release at all times then?
I.e. whatever is the latest version listed here: https://omahaproxy.appspot.com/history?os=android&channel=stable ?
And would we only do this for arm / arm64? Or would we aim to do this across different architectures as well?
Yes - always relative to the latest stable.
This will run on perf builders, so just arm & arm64.
Blockedon: 697221
Project Member

Comment 8 by bugdroid1@chromium.org, Mar 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c456252b3545304bd41c67a3c2379a12a3ec98f

commit 4c456252b3545304bd41c67a3c2379a12a3ec98f
Author: estevenson <estevenson@chromium.org>
Date: Wed Mar 01 15:21:44 2017

Add bsdiff to //build/install-build-deps-android.sh.

bsdiff is required for apk-patch-size-estimator to work, which will
allow developers to check how their CLs affect patch size.

BUG= 695188 

Review-Url: https://codereview.chromium.org/2721023003
Cr-Commit-Position: refs/heads/master@{#453936}

[modify] https://crrev.com/4c456252b3545304bd41c67a3c2379a12a3ec98f/build/install-build-deps-android.sh

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 8 2017

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2850476323ae769b612011f3d99a2d17759a2952

commit 2850476323ae769b612011f3d99a2d17759a2952
Author: estevenson <estevenson@chromium.org>
Date: Mon Mar 13 22:07:29 2017

Add utility for downloading reference APKs.

This will be used primarily on perf bots to download APKs used for
tracking per-milestone patch size growth.

BUG= 695188 

Review-Url: https://codereview.chromium.org/2750603003
Cr-Commit-Position: refs/heads/master@{#456502}

[modify] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/.gitignore
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/OWNERS
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/56/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/57/ChromeModernPublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/57/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/58/ChromeModernPublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/58/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_Builder/58/MonochromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_arm64_Builder/56/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_arm64_Builder/57/ChromeModernPublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_arm64_Builder/57/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_arm64_Builder/58/ChromeModernPublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/apks/Android_arm64_Builder/58/ChromePublic.apk.sha1
[add] https://crrev.com/2850476323ae769b612011f3d99a2d17759a2952/build/android/binary_size/update_apks.py

Cc: nduca@chromium.org benhenry@chromium.org agrieve@chromium.org
This is really cool! But who is the long-term owner? Is there a team that owns it?
chrome-binary-size@ is the owning team.
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/eca15296bf0f928789c471f134c7cc9f8e34452d

commit eca15296bf0f928789c471f134c7cc9f8e34452d
Author: Eric Stevenson <estevenson@chromium.org>
Date: Wed Mar 22 13:32:18 2017

Add patch size estimation to Android perf builders.

This CL enables patch size estimation for Android perf builders via
resource_sizes.py. For now, this is only done with a couple targets
since the apk-patch-size-estimator takes several minutes to run and
MonochromePublic.apk will likely catch all significant patch size jumps.

BUG= 695188 

Change-Id: I4811831bd73b6844b9c26beb7c7ddbca5f433541
Reviewed-on: https://chromium-review.googlesource.com/457417
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>

[modify] https://crrev.com/eca15296bf0f928789c471f134c7cc9f8e34452d/scripts/slave/recipes/android/builder.expected/full_chromium_perf_Android_arm64_Builder.json
[modify] https://crrev.com/eca15296bf0f928789c471f134c7cc9f8e34452d/scripts/slave/recipe_modules/chromium_android/api.py
[modify] https://crrev.com/eca15296bf0f928789c471f134c7cc9f8e34452d/scripts/slave/recipes/android/builder.expected/full_chromium_perf_Android_Builder.json
[modify] https://crrev.com/eca15296bf0f928789c471f134c7cc9f8e34452d/scripts/slave/recipes/android/builder.py

So cool! Looking forward to next branch cut to see why the lines grow from 0 to 11MB (like file-by-file reports right now).

Mark as fixed?
Status: Fixed (was: Available)
Also updated the per-milestone dashboard to include patch size estimates (won't have data for this one for a while yet): https://chromeperf.appspot.com/speed_releasing/MonochromePublic.apk%20per-milestone%20resource_sizes?sortby=end_revision&sortdirection=down.
Labels: -binary-size Performance-Size
Project Member

Comment 20 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build/+/9da23f839fbd8606189e749cb92fb707cb9f4bce

commit 9da23f839fbd8606189e749cb92fb707cb9f4bce
Author: Eric Stevenson <estevenson@chromium.org>
Date: Wed Jun 14 15:06:45 2017

Remove patch size estimation from Android perf builders.

Mostly a revert of eca15296bf0f928789c471f134c7cc9f8e34452d.

Patch size estimation is too slow for builders. It might be turned on
again in the future on testers.

BUG= 695188 ,  726718 

Change-Id: I4efde4a1585e17833a537ce76a7d7a72c79d0fe8
Reviewed-on: https://chromium-review.googlesource.com/531584
Reviewed-by: John Budorick <jbudorick@google.com>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>

[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipes/android/builder.expected/full_chromium_perf_Android_Builder.json
[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipes/android/builder.expected/full_chromium_perf_Android_arm64_Builder.json
[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipe_modules/chromium_android/tests/resource_sizes.expected/basic.json
[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipe_modules/chromium_android/tests/resource_sizes.py
[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipes/android/builder.py
[modify] https://crrev.com/9da23f839fbd8606189e749cb92fb707cb9f4bce/scripts/slave/recipe_modules/chromium_android/api.py

Sign in to add a comment