Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java

Issue 2559823004: Android: Clean up histogram buckets range (Closed)
Patch Set: Use zoomedIn and zoomedOut. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.tab; 5 package org.chromium.chrome.browser.tab;
6 6
7 import android.os.SystemClock; 7 import android.os.SystemClock;
8 import android.support.annotation.IntDef; 8 import android.support.annotation.IntDef;
9 import android.view.View; 9 import android.view.View;
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 boolean isMainFrame, String validatedUrl, boolean isErrorPage) { 193 boolean isMainFrame, String validatedUrl, boolean isErrorPage) {
194 if (isMainFrame) mTab.didStartPageLoad(validatedUrl, isErrorPage); 194 if (isMainFrame) mTab.didStartPageLoad(validatedUrl, isErrorPage);
195 195
196 mTab.handleDidStartProvisionalLoadForFrame(isMainFrame, validatedUrl); 196 mTab.handleDidStartProvisionalLoadForFrame(isMainFrame, validatedUrl);
197 } 197 }
198 198
199 @Override 199 @Override
200 public void didCommitProvisionalLoadForFrame(long frameId, boolean isMainFra me, String url, 200 public void didCommitProvisionalLoadForFrame(long frameId, boolean isMainFra me, String url,
201 int transitionType) { 201 int transitionType) {
202 if (isMainFrame && UmaUtils.isRunningApplicationStart()) { 202 if (isMainFrame && UmaUtils.isRunningApplicationStart()) {
203 // Currently it takes about 2000ms to commit a navigation if the mea surement 203 // Current median is 550ms, and long tail is very long. ZoomedIn giv es good view of the
pasko 2016/12/15 13:36:19 wow, I did not realize that so drastically! yay!
Peter Wen 2016/12/15 13:39:11 Yay! I didn't have context to know whether that wa
204 // begins very early in the browser start. How many buckets (b) are needed to 204 // median and ZoomedOut gives a good overview.
205 // explore the _typical_ values with granularity 100ms and a maximum duration 205 RecordHistogram.recordCustomTimesHistogram(
206 // of 1 minute? 206 "Startup.FirstCommitNavigationTime2.ZoomedIn",
207 // s^{n+1} / s^{n} = 2100 / 2000
208 // s = 1.05
209 // s^b = 60000
210 // b = ln(60000) / ln(1.05) ~= 225
211 RecordHistogram.recordCustomTimesHistogram("Startup.FirstCommitNavig ationTime2",
212 SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime (), 207 SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime (),
213 1, 60000 /* 1 minute */, TimeUnit.MILLISECONDS, 225); 208 200, 1000, TimeUnit.MILLISECONDS, 100);
209 RecordHistogram.recordCustomTimesHistogram(
210 "Startup.FirstCommitNavigationTime2.ZoomedOut",
211 SystemClock.uptimeMillis() - UmaUtils.getForegroundStartTime (),
212 50, TimeUnit.MINUTES.toMillis(10), TimeUnit.MILLISECONDS, 50 );
Alexei Svitkine (slow) 2016/12/15 00:34:37 Is the 50 for the min value intentional? If so, ad
pasko 2016/12/15 13:36:19 I think the comment just above sufficiently explai
Peter Wen 2016/12/15 13:39:11 Done adding a quick comment and reference to other
214 UmaUtils.setRunningApplicationStart(false); 213 UmaUtils.setRunningApplicationStart(false);
215 } 214 }
216 215
217 if (isMainFrame) { 216 if (isMainFrame) {
218 mTab.setIsTabStateDirty(true); 217 mTab.setIsTabStateDirty(true);
219 mTab.updateTitle(); 218 mTab.updateTitle();
220 } 219 }
221 220
222 RewindableIterator<TabObserver> observers = mTab.getTabObservers(); 221 RewindableIterator<TabObserver> observers = mTab.getTabObservers();
223 while (observers.hasNext()) { 222 while (observers.hasNext()) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 311 }
313 } 312 }
314 313
315 @Override 314 @Override
316 public void destroy() { 315 public void destroy() {
317 MediaCaptureNotificationService.updateMediaNotificationForTab( 316 MediaCaptureNotificationService.updateMediaNotificationForTab(
318 mTab.getApplicationContext(), mTab.getId(), 0, mTab.getUrl()); 317 mTab.getApplicationContext(), mTab.getId(), 0, mTab.getUrl());
319 super.destroy(); 318 super.destroy();
320 } 319 }
321 } 320 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698