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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 481443003: Add UMA histograms for the inter-process TimeTicks skew. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Alexei's comments. Created 6 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 | content/child/resource_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 832911c8a939a52ce1c050de11a8a4d2675b3586..9127f4b8ba0d54e9e2d3b89d814b5672e1ae1e20 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/containers/hash_tables.h"
#include "base/lazy_instance.h"
+#include "base/metrics/histogram.h"
#include "base/metrics/user_metrics_action.h"
#include "base/time/time.h"
#include "content/browser/accessibility/accessibility_mode_helper.h"
@@ -748,6 +749,23 @@ void RenderFrameHostImpl::OnBeforeUnloadACK(
converter.ToLocalTimeTicks(
RemoteTimeTicks::FromTimeTicks(renderer_before_unload_end_time));
before_unload_end_time = browser_before_unload_end_time.ToTimeTicks();
+
+ // Collect UMA on the inter-process skew.
+ bool is_skew_additive = false;
+ if (converter.IsSkewAdditiveForMetrics()) {
+ is_skew_additive = true;
+ base::TimeDelta skew = converter.GetSkewForMetrics();
+ if (skew >= base::TimeDelta()) {
+ UMA_HISTOGRAM_TIMES(
+ "InterProcessTimeTicks.BrowserBehind_RendererToBrowser", skew);
+ } else {
+ UMA_HISTOGRAM_TIMES(
+ "InterProcessTimeTicks.BrowserAhead_RendererToBrowser", -skew);
+ }
+ }
+ UMA_HISTOGRAM_BOOLEAN(
+ "InterProcessTimeTicks.IsSkewAdditive_RendererToBrowser",
+ is_skew_additive);
}
frame_tree_node_->render_manager()->OnBeforeUnloadACK(
render_view_host_->unload_ack_is_for_cross_site_transition_, proceed,
« no previous file with comments | « no previous file | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698