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

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

Issue 2911743002: Add UMA metric of time to start the first render process (Closed)
Patch Set: fix copy-o Created 3 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: 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 8d9e4669e7c6fe6bd9900e7fb6e526895cef86f2..fe972a9b8720cfc18fd8f560bd6a62d1410c5bce 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.cc
+++ b/components/startup_metric_utils/browser/startup_metric_utils.cc
@@ -718,9 +718,11 @@ void RecordFirstWebContentsMainFrameLoad(base::TimeTicks ticks) {
g_process_creation_ticks.Get(), ticks);
}
-void RecordFirstWebContentsNonEmptyPaint(base::TimeTicks ticks) {
+void RecordFirstWebContentsNonEmptyPaint(
+ base::TimeTicks now,
+ base::TimeTicks render_process_host_init_time) {
static bool is_first_call = true;
- if (!is_first_call || ticks.is_null())
+ if (!is_first_call || now.is_null())
return;
is_first_call = false;
@@ -735,11 +737,16 @@ void RecordFirstWebContentsNonEmptyPaint(base::TimeTicks ticks) {
metrics::CallStackProfileMetricsProvider::FIRST_NONEMPTY_PAINT);
UMA_HISTOGRAM_AND_TRACE_WITH_TEMPERATURE_AND_SAME_VERSION_COUNT(
UMA_HISTOGRAM_LONG_TIMES_100, "Startup.FirstWebContents.NonEmptyPaint2",
- g_process_creation_ticks.Get(), ticks);
+ g_process_creation_ticks.Get(), now);
UMA_HISTOGRAM_WITH_TEMPERATURE(
UMA_HISTOGRAM_LONG_TIMES_100,
"Startup.BrowserMessageLoopStart.To.NonEmptyPaint2",
- ticks - g_message_loop_start_ticks.Get());
+ now - g_message_loop_start_ticks.Get());
+
+ UMA_HISTOGRAM_WITH_TEMPERATURE(
+ UMA_HISTOGRAM_LONG_TIMES_100,
+ "Startup.FirstWebContents.RenderProcessHostInit.To.NonEmptyPaint",
+ now - render_process_host_init_time);
}
void RecordFirstWebContentsMainNavigationStart(base::TimeTicks ticks,

Powered by Google App Engine
This is Rietveld 408576698