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

Unified Diff: chrome/browser/metrics/first_web_contents_profiler.cc

Issue 2911743002: Add UMA metric of time to start the first render process (Closed)
Patch Set: rebase 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: chrome/browser/metrics/first_web_contents_profiler.cc
diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc
index e67831b79e6fce602d4809f1f063e0ebf8c325ad..dc87c1f8bcb447f36a317658a9dbe6a373ba1662 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.cc
+++ b/chrome/browser/metrics/first_web_contents_profiler.cc
@@ -19,6 +19,8 @@
#include "components/metrics/proto/profiler_event.pb.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "content/public/browser/navigation_handle.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/browser_side_navigation_policy.h"
@@ -106,7 +108,10 @@ void FirstWebContentsProfiler::DidFirstVisuallyNonEmptyPaint() {
collected_paint_metric_ = true;
startup_metric_utils::RecordFirstWebContentsNonEmptyPaint(
- base::TimeTicks::Now());
+ base::TimeTicks::Now(), web_contents()
+ ->GetMainFrame()
+ ->GetProcess()
+ ->GetInitTimeForNavigationMetrics());
gab 2017/06/01 14:56:45 Does the browser get this signal before? startup_m
metrics::TrackingSynchronizer::OnProfilingPhaseCompleted(
metrics::ProfilerEventProto::EVENT_FIRST_NONEMPTY_PAINT);

Powered by Google App Engine
This is Rietveld 408576698