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

Unified Diff: chrome/common/startup_metric_utils.cc

Issue 14946003: Record first run startup metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 7 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/common/startup_metric_utils.cc
diff --git a/chrome/common/startup_metric_utils.cc b/chrome/common/startup_metric_utils.cc
index 6b12be5f51ab7b5d877371f54d9573abb491ace8..174923bf052bc5a88106818d00693d90066ba9a0 100644
--- a/chrome/common/startup_metric_utils.cc
+++ b/chrome/common/startup_metric_utils.cc
@@ -65,7 +65,7 @@ const base::Time MainEntryStartTime() {
return *MainEntryPointTimeInternal();
}
-void OnBrowserStartupComplete() {
+void OnBrowserStartupComplete(bool is_first_run) {
// Bail if uptime < 7 minutes, to filter out cases where Chrome may have been
// autostarted and the machine is under io pressure.
const int64 kSevenMinutesInMilliseconds =
@@ -85,9 +85,15 @@ void OnBrowserStartupComplete() {
// cases where Chrome is auto-started and IO is heavily loaded.
base::TimeDelta startup_time_from_main_entry =
base::Time::Now() - MainEntryStartTime();
- UMA_HISTOGRAM_LONG_TIMES(
- "Startup.BrowserMessageLoopStartTimeFromMainEntry",
- startup_time_from_main_entry);
+ if (is_first_run) {
jeremy 2013/05/06 17:59:38 Can you make this one call and stick the histogram
gab 2013/05/06 18:44:51 As explained to me by isherman@ (see [1]): the mac
Ilya Sherman 2013/05/06 23:46:24 Specifically, the requirement is that string needs
gab 2013/05/07 02:59:03 I see, thanks for the feedback, will keep it as is
+ UMA_HISTOGRAM_LONG_TIMES(
+ "Startup.FirstRun.BrowserMessageLoopStartTimeFromMainEntry",
Ilya Sherman 2013/05/06 23:46:24 nit: You might want to name this "Startup.BrowserM
gab 2013/05/07 02:59:03 Good point, I initially had more than one Startup.
+ startup_time_from_main_entry);
+ } else {
+ UMA_HISTOGRAM_LONG_TIMES(
+ "Startup.BrowserMessageLoopStartTimeFromMainEntry",
+ startup_time_from_main_entry);
+ }
// Create another histogram that records the exact number for use by
// performance tests.
« chrome/browser/ui/gtk/first_run_dialog.cc ('K') | « chrome/common/startup_metric_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698