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

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: Fix Android/Linux Aurora compile failure 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
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.cc ('k') | chrome/browser/safe_browsing/database_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index d9e443d307de45fc135e6b5462e2540debe49f3c..5da5699df7fe8ef0a963f4ae9a0c572d0459e28d 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1615,29 +1615,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.
« no previous file with comments | « chrome/browser/bookmarks/bookmark_storage.cc ('k') | chrome/browser/safe_browsing/database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698