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

Unified Diff: content/renderer/input/render_widget_input_handler.cc

Issue 1955643002: Add UMA metric to track the time saved on making events passive during fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add one more histogram Created 4 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
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/render_widget_input_handler.cc
diff --git a/content/renderer/input/render_widget_input_handler.cc b/content/renderer/input/render_widget_input_handler.cc
index 75d8f46974b897e701baf2971508eefdd2fead98..ee6584e5ef5a8e99664187a7e876f1bab01897bb 100644
--- a/content/renderer/input/render_widget_input_handler.cc
+++ b/content/renderer/input/render_widget_input_handler.cc
@@ -332,6 +332,25 @@ void RenderWidgetInputHandler::HandleInputEvent(
LogPassiveEventListenersUma(
processed, static_cast<const WebTouchEvent&>(input_event).dispatchType,
input_event.timeStampSeconds, latency_info);
+
+ if (base::TimeTicks::IsHighResolution() &&
+ input_event.type == WebInputEvent::TouchStart &&
+ static_cast<const WebTouchEvent&>(input_event).dispatchType ==
+ WebInputEvent::Blocking) {
+ base::TimeTicks now = base::TimeTicks::Now();
+ if (static_cast<const WebTouchEvent&>(input_event)
tdresser 2016/05/12 12:11:32 Let's only perform the cast once, as soon as we kn
+ .dispatchedDuringFling) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Touch.TouchStartDuringFlingLatency",
+ GetEventLatencyMicros(input_event.timeStampSeconds, now), 1,
+ 10000000, 100);
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Touch.TouchStartNoFlingLatency",
tdresser 2016/05/12 12:11:32 TouchStartNoFlingLatency -> TouchStartOutsideFling
+ GetEventLatencyMicros(input_event.timeStampSeconds, now), 1,
+ 10000000, 100);
+ }
+ }
} else if (input_event.type == WebInputEvent::MouseWheel) {
LogPassiveEventListenersUma(
processed,
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698