Commit 21025291 authored by wnwen's avatar wnwen Committed by Commit bot

Android: Clean up histogram buckets range

Startup.FirstCommitNavigationTime2

BUG=668726

Review-Url: https://codereview.chromium.org/2559823004
Cr-Commit-Position: refs/heads/master@{#438872}
parent 8f87b825
...@@ -200,17 +200,18 @@ public class TabWebContentsObserver extends WebContentsObserver { ...@@ -200,17 +200,18 @@ public class TabWebContentsObserver extends WebContentsObserver {
public void didCommitProvisionalLoadForFrame(long frameId, boolean isMainFrame, String url, public void didCommitProvisionalLoadForFrame(long frameId, boolean isMainFrame, String url,
int transitionType) { int transitionType) {
if (isMainFrame && UmaUtils.isRunningApplicationStart()) { if (isMainFrame && UmaUtils.isRunningApplicationStart()) {
// Currently it takes about 2000ms to commit a navigation if the measurement // Current median is 550ms, and long tail is very long. ZoomedIn gives good view of the
// begins very early in the browser start. How many buckets (b) are needed to // median and ZoomedOut gives a good overview.
// explore the _typical_ values with granularity 100ms and a maximum duration RecordHistogram.recordCustomTimesHistogram(
// of 1 minute? "Startup.FirstCommitNavigationTime2.ZoomedIn",
// s^{n+1} / s^{n} = 2100 / 2000
// s = 1.05
// s^b = 60000
// b = ln(60000) / ln(1.05) ~= 225
RecordHistogram.recordCustomTimesHistogram("Startup.FirstCommitNavigationTime2",
SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime(), SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime(),
1, 60000 /* 1 minute */, TimeUnit.MILLISECONDS, 225); 200, 1000, TimeUnit.MILLISECONDS, 100);
// For ZoomedOut very rarely is it under 50ms and this range matches
// CustomTabs.IntentToFirstCommitNavigationTime2.ZoomedOut.
RecordHistogram.recordCustomTimesHistogram(
"Startup.FirstCommitNavigationTime2.ZoomedOut",
SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime(),
50, TimeUnit.MINUTES.toMillis(10), TimeUnit.MILLISECONDS, 50);
UmaUtils.setRunningApplicationStart(false); UmaUtils.setRunningApplicationStart(false);
} }
......
...@@ -110306,6 +110306,7 @@ value. ...@@ -110306,6 +110306,7 @@ value.
<affected-histogram <affected-histogram
name="ChromeGeneratedCustomTab.IntentToFirstCommitNavigationTime2"/> name="ChromeGeneratedCustomTab.IntentToFirstCommitNavigationTime2"/>
<affected-histogram name="CustomTabs.IntentToFirstCommitNavigationTime2"/> <affected-histogram name="CustomTabs.IntentToFirstCommitNavigationTime2"/>
<affected-histogram name="Startup.FirstCommitNavigationTime2"/>
</histogram_suffixes> </histogram_suffixes>
<histogram_suffixes name="InterProcessTimeTicksConversionType"> <histogram_suffixes name="InterProcessTimeTicksConversionType">
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