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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 841443002: mac: Add a metric for the time blocked by WaitForSurface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « 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: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 986bda4ecce621a7506bd15622cf455f13b29864..001f5b7e35aac56d03bad82eeb6bb0e4af5ee8c7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -805,7 +805,8 @@ void RenderWidgetHostImpl::WaitForSurface() {
}
TimeDelta max_delay = TimeDelta::FromMilliseconds(kPaintMsgTimeoutMS);
- TimeTicks end_time = TimeTicks::Now() + max_delay;
+ TimeTicks start_time = TimeTicks::Now();
+ TimeTicks end_time = start_time + max_delay;
do {
TRACE_EVENT0("renderer_host", "WaitForSurface::WaitForUpdate");
@@ -835,6 +836,11 @@ void RenderWidgetHostImpl::WaitForSurface() {
// BackingStore messages to get to the latest.
max_delay = end_time - TimeTicks::Now();
} while (max_delay > TimeDelta::FromSeconds(0));
+
ccameron 2015/01/06 02:14:21 It should be possible to combine the base::TimeTic
erikchen 2015/01/06 03:23:16 It saves a call to TimeTicks::Now(), plus the orig
+ TimeDelta wait_duration = TimeTicks::Now() - start_time;
+ UMA_HISTOGRAM_CUSTOM_TIMES("OSX.RendererHost.SurfaceWaitTime", wait_duration,
+ TimeDelta::FromMilliseconds(1),
+ TimeDelta::FromMilliseconds(200), 50);
}
#endif
« 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