| Index: chrome/browser/android/tab_android.cc
|
| diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
|
| index 7354f24aac174ab3f381da39389d80b185b167c0..e7ce1c8d17890596a60fb6293005ec400bed861e 100644
|
| --- a/chrome/browser/android/tab_android.cc
|
| +++ b/chrome/browser/android/tab_android.cc
|
| @@ -8,7 +8,9 @@
|
| #include "base/android/jni_array.h"
|
| #include "base/android/jni_string.h"
|
| #include "base/debug/trace_event.h"
|
| +#include "base/metrics/histogram.h"
|
| #include "chrome/browser/android/chrome_web_contents_delegate_android.h"
|
| +#include "chrome/browser/android/uma_utils.h"
|
| #include "chrome/browser/browser_about_handler.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| @@ -748,3 +750,19 @@ static void Init(JNIEnv* env, jobject obj) {
|
| bool TabAndroid::RegisterTabAndroid(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
| +
|
| +static void RecordStartupToCommitUma(JNIEnv* env, jclass jcaller) {
|
| + // Currently it takes about 2000ms to commit a navigation if the measurement
|
| + // begins very early in the browser start. How many buckets (b) are needed to
|
| + // explore the _typical_ values with granularity 100ms and a maximum duration
|
| + // of 1 minute?
|
| + // s^{n+1} / s^{n} = 2100 / 2000
|
| + // s = 1.05
|
| + // s^b = 60000
|
| + // b = ln(60000) / ln(1.05) ~= 225
|
| + UMA_HISTOGRAM_CUSTOM_TIMES("Startup.FirstCommitNavigationTime",
|
| + base::Time::Now() - chrome::android::GetMainEntryPointTime(),
|
| + base::TimeDelta::FromMilliseconds(1),
|
| + base::TimeDelta::FromMinutes(1),
|
| + 225);
|
| +}
|
|
|