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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 11785014: Record metrics for slow startups (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup Created 7 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 07e9876c979e7bb20da55cca58fe770ccc492df8..9ea98986a74c66a65f91fd35c25a033793342568 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1616,29 +1616,8 @@ void RecordBrowserStartupTime() {
base::Time::Now() - *process_creation_time);
#endif // OS_MACOSX || OS_WIN
- // Startup.BrowserMessageLoopStartTime exhibits instability in the field
- // which limits its usefullness in all scenarios except when we have a very
- // large sample size.
- // Attempt to mitigate this with a new metric:
- // * Measure time from main entry rather than the OS' notion of process start
- // time.
- // * Only measure launches that occur 7 minutes after boot to try to avoid
- // cases where Chrome is auto-started and IO is heavily loaded.
- const int64 kSevenMinutesInMilliseconds =
- base::TimeDelta::FromMinutes(7).InMilliseconds();
- if (base::SysInfo::Uptime() < kSevenMinutesInMilliseconds)
- return;
-
- // Set up to match Startup.BrowserMessageLoopStartTime measurement above.
- const base::TimeDelta kStartupTimeMin(base::TimeDelta::FromMilliseconds(1));
- const base::TimeDelta kStartupTimeMax(base::TimeDelta::FromHours(1));
- static const size_t kStartupTimeBuckets(100);
- HISTOGRAM_CUSTOM_TIMES(
- "Startup.BrowserMessageLoopStartTimeFromMainEntry",
- base::Time::Now() - startup_metric_utils::MainEntryStartTime(),
- kStartupTimeMin,
- kStartupTimeMax,
- kStartupTimeBuckets);
+ // Record collected startup metrics.
+ startup_metric_utils::OnBrowserStartupComplete();
}
// This code is specific to the Windows-only PreReadExperiment field-trial.

Powered by Google App Engine
This is Rietveld 408576698