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

Unified Diff: components/startup_metric_utils/browser/startup_metric_utils.cc

Issue 2223183002: Remove "< 7 minutes system startup" from startup metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add reference to bug Created 4 years, 4 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/startup_metric_utils/browser/startup_metric_utils.cc
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.cc b/components/startup_metric_utils/browser/startup_metric_utils.cc
index b2852722466a28b7b95408af5bf24439a9205242..3949e6f3aaf53e5f0cedbc8cac070470285fe899 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.cc
+++ b/components/startup_metric_utils/browser/startup_metric_utils.cc
@@ -608,27 +608,37 @@ void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks,
process_creation_ticks, ticks);
}
- // Bail if uptime < 7 minutes, to filter out cases where Chrome may have been
- // autostarted and the machine is under io pressure.
- if (base::SysInfo::Uptime() < base::TimeDelta::FromMinutes(7))
- return;
-
- // The Startup.BrowserMessageLoopStartTime histogram exhibits instability in
- // the field which limits its usefulness 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.
- // * Only measure launches that occur 7 minutes after boot to try to avoid
- // cases where Chrome is auto-started and IO is heavily loaded.
+ // TODO(fdoray): Remove histograms that are only recorded after 7 minutes of
+ // OS uptime once M54 hits stable. These histograms are kept for now to allow
+ // regressions to be caught reliably in M54, to be removed in M55.
+ // crbug.com/634408
+ const bool is_seven_minutes_after_boot =
+ base::SysInfo::Uptime() < base::TimeDelta::FromMinutes(7);
+
+ // Record timing between the shared library's main() entry and the browser
+ // main message loop start.
if (is_first_run) {
UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE(
UMA_HISTOGRAM_LONG_TIMES,
- "Startup.BrowserMessageLoopStartTimeFromMainEntry.FirstRun",
+ "Startup.BrowserMessageLoopStartTimeFromMainEntry.FirstRun2",
g_browser_main_entry_point_ticks.Get(), ticks);
+ if (is_seven_minutes_after_boot) {
+ UMA_HISTOGRAM_WITH_TEMPERATURE(
+ UMA_HISTOGRAM_LONG_TIMES,
+ "Startup.BrowserMessageLoopStartTimeFromMainEntry.FirstRun",
+ ticks - g_browser_main_entry_point_ticks.Get());
+ }
} else {
UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
UMA_HISTOGRAM_LONG_TIMES,
- "Startup.BrowserMessageLoopStartTimeFromMainEntry",
+ "Startup.BrowserMessageLoopStartTimeFromMainEntry2",
g_browser_main_entry_point_ticks.Get(), ticks);
+ if (is_seven_minutes_after_boot) {
+ UMA_HISTOGRAM_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
+ UMA_HISTOGRAM_LONG_TIMES,
+ "Startup.BrowserMessageLoopStartTimeFromMainEntry",
+ ticks - g_browser_main_entry_point_ticks.Get());
+ }
}
// Record timings between process creation, the main() in the executable being
@@ -638,19 +648,31 @@ void RecordBrowserMainMessageLoopStart(const base::TimeTicks& ticks,
if (!exe_main_ticks.is_null()) {
// Process create to chrome.exe:main().
UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
- UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToExeMain",
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToExeMain2",
process_creation_ticks, exe_main_ticks);
// chrome.exe:main() to chrome.dll:main().
UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
- UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ExeMainToDllMain",
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ExeMainToDllMain2",
exe_main_ticks, g_browser_main_entry_point_ticks.Get());
// Process create to chrome.dll:main(). Reported as a histogram only as
// the other two events above are sufficient for tracing purposes.
UMA_HISTOGRAM_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
- UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToDllMain",
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToDllMain2",
g_browser_main_entry_point_ticks.Get() - process_creation_ticks);
+
+ if (is_seven_minutes_after_boot) {
+ UMA_HISTOGRAM_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToExeMain",
+ exe_main_ticks - process_creation_ticks);
+ UMA_HISTOGRAM_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ExeMainToDllMain",
+ g_browser_main_entry_point_ticks.Get() - exe_main_ticks);
+ UMA_HISTOGRAM_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
+ UMA_HISTOGRAM_LONG_TIMES, "Startup.LoadTime.ProcessCreateToDllMain",
+ g_browser_main_entry_point_ticks.Get() - process_creation_ticks);
+ }
}
}
}
« 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