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

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

Issue 1907803002: Add metric to determine the benefit of forcing an event listener to be passive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_touch_scroll_intervention_uma
Patch Set: Created 4 years, 8 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/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 3d793bb66e161b15a01cc1f6732cdcf50c3fe820..5ac461362c7c5b66423a61d757ae1f3df0eaac8a 100644
--- a/content/renderer/input/render_widget_input_handler.cc
+++ b/content/renderer/input/render_widget_input_handler.cc
@@ -117,11 +117,6 @@ void LogInputEventLatencyUma(const WebInputEvent& event, base::TimeTicks now) {
#undef CASE_TYPE
}
-void LogPassiveLatency(int64_t latency) {
- UMA_HISTOGRAM_CUSTOM_COUNTS("Event.PassiveListeners.Latency", latency, 1,
- 10000000, 100);
-}
-
void LogPassiveEventListenersUma(WebInputEventResult result,
WebInputEvent::DispatchType dispatch_type,
double event_timestamp,
@@ -166,7 +161,16 @@ void LogPassiveEventListenersUma(WebInputEventResult result,
if (enum_value == PASSIVE_LISTENER_UMA_ENUM_CANCELABLE &&
base::TimeTicks::IsHighResolution()) {
base::TimeTicks now = base::TimeTicks::Now();
- LogPassiveLatency(GetEventLatencyMicros(event_timestamp, now));
+ UMA_HISTOGRAM_CUSTOM_COUNTS("Event.PassiveListeners.Latency",
+ GetEventLatencyMicros(event_timestamp, now), 1,
+ 10000000, 100);
+ }
+
+ if (dispatch_type == WebInputEvent::ListenersForcedNonBlockingPassive) {
+ base::TimeTicks now = base::TimeTicks::Now();
tdresser 2016/04/21 13:36:42 Are you intentionally only recording the first one
dtapuska 2016/04/21 13:38:34 Err no; I meant to move this into a if(highRes) {
dtapuska 2016/04/21 20:46:38 Done.
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.PassiveListeners.ForcedNonBlockingLatency",
+ GetEventLatencyMicros(event_timestamp, now), 1, 10000000, 100);
}
}
« 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