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

Issue 842023 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Add page load metrics for webapk launches

Project Member Reported by yfried...@chromium.org, May 11 2018

Issue description

We want something similar to "Startup.Android.Experimental.Cold.*" for PWA starts.

We should record a separate histogram for same set of circumstances but just for WebApkActivity cause it's a small fraction of chrome launches.

Additionally, we can also measure the full user-perceived time from home icon click by add a new intent extra for when the webapk launches its host browser. This should be omitted if we show any browser-selection UI as we don't want to get skew from time the user was looking at the browser selector UI.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 17 2018

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

commit 7ebdeaf6e47902f1e49d7f0fde770af2fca15b09
Author: Mohamed Heikal <mheikal@google.com>
Date: Thu May 17 21:02:19 2018

[WebApk] Adds intent extra to record start of WebApk for Uma

This adds an intent extra to record the time when MainActivity.onCreate
was called. This is done in an effort to track how long it takes after
the user presses the webapk icon does chrome take to launch and finish
its startup.

Bug:  842023 
Change-Id: I1b95f91c428be4350fc2b53a6d4985b79146c1a2
Reviewed-on: https://chromium-review.googlesource.com/1060553
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559672}
[modify] https://crrev.com/7ebdeaf6e47902f1e49d7f0fde770af2fca15b09/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java
[modify] https://crrev.com/7ebdeaf6e47902f1e49d7f0fde770af2fca15b09/chrome/android/webapk/shell_apk/shell_apk_version.gni
[modify] https://crrev.com/7ebdeaf6e47902f1e49d7f0fde770af2fca15b09/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/HostBrowserLauncher.java
[modify] https://crrev.com/7ebdeaf6e47902f1e49d7f0fde770af2fca15b09/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java
[modify] https://crrev.com/7ebdeaf6e47902f1e49d7f0fde770af2fca15b09/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity.java

Project Member

Comment 2 by bugdroid1@chromium.org, May 24 2018

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

commit 150951c135f6b89606fa083091489fae4e6983fd
Author: Mohamed Heikal <mheikal@google.com>
Date: Thu May 24 00:26:51 2018

[UMA] Update activity tab startup UMA histograms (+UmaUtils refactor)

This renames "Startup.Android.Experimental.Cold.TimeToFirstNavigationCommit" to
"Startup.Android.Cold.TimeToFirstNavigationCommit.Tabbed" similarly for
"Startup.Android.Experimental.Cold.TimeToFirstContentfulPaint".
This also creates another suffix ".WebApk" for these histograms to track
startup numbers for PWAs in chrome. The new histograms now use "Medium Times"
which has a shorter range since the long tail is no longer a problem.

This change also refactors the Activity related tracking code in UmaUtils into
AcitivityTabStartupMetricsTracker.java

Change-Id: Ia8c309f1c791a2c491832f3945bb54b47952f821
Bug:  842023 
Reviewed-on: https://chromium-review.googlesource.com/1063011
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561329}
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java
[add] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/metrics/ActivityTabStartupMetricsTracker.java
[delete] https://crrev.com/4235ac0aea0b0bdfbac6e6b20e27e2980f64986f/chrome/android/java/src/org/chromium/chrome/browser/metrics/StartupPageLoadMetricsObserver.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/java_sources.gni
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/StartupLoadingMetricsTest.java
[modify] https://crrev.com/150951c135f6b89606fa083091489fae4e6983fd/tools/metrics/histograms/histograms.xml

Project Member

Comment 3 by bugdroid1@chromium.org, May 29 2018

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

commit 1b30e16b2bacda47b1453d25b39977c8ad014560
Author: Mohamed Heikal <mheikal@google.com>
Date: Tue May 29 16:33:09 2018

[UMA] Fix misconfigured histogram suffix

A previous change to rename a histogram missed the suffix declaration.
This change changes the suffix to refer to the renamed histogram.

Bug:  842023 
Change-Id: I97f0f8ae7e3cc48d4bfbb820ada67ec5088a0cdc
Reviewed-on: https://chromium-review.googlesource.com/1075514
Reviewed-by: Brian White <bcwhite@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562457}
[modify] https://crrev.com/1b30e16b2bacda47b1453d25b39977c8ad014560/tools/metrics/histograms/histograms.xml

I working on recording time to splashscreen visible/hidden from web apk shell launch. However I am not sure if we care about chrome cold vs warm launch. ie. the time will be different if chrome was already running vs if chrome started cold on the webapk shell launch. Also how to handle the long tail if chrome is backgrounded during the webapk launch.
I think just supporting cold start is the highest priority item. There's less to be gained from warm start. 
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 6 2018

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

commit 79b210723ae6a08f34aef3ded7098e48aad6bedc
Author: Mohamed Heikal <mheikal@google.com>
Date: Wed Jun 06 21:33:07 2018

[Android] Adds splashscreen visible/hidden UMA histogram

WebAPK shell currently sends us activity creation timestamp in the
intent extras. This CL wires it through to the splashscreen UMA handler
and records time to splashscreen shown/hidden from the launch of the
WebAPK.

Bug:  842023 
Change-Id: Ie8c7289de4ce0f31cddec3bfec8e538a73469ae9
Reviewed-on: https://chromium-review.googlesource.com/1073875
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565041}
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
[add] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkSplashscreenMetrics.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebappUma.java
[add] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/webapps/SplashscreenObserver.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappLauncherActivity.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/chrome/android/java_sources.gni
[modify] https://crrev.com/79b210723ae6a08f34aef3ded7098e48aad6bedc/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)
We are getting some numbers from canary. I am closing this bug.

Sign in to add a comment