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: tools/telemetry/telemetry/web_perf/metrics/smoothness.py

Issue 300273002: Report only one input latency metric mean_input_event_latency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also search latency slice in renderer process since that's where plugin input event's latency is ge… Created 6 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 | « tools/telemetry/telemetry/web_perf/metrics/rendering_stats_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/web_perf/metrics/smoothness.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/smoothness.py b/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
index fff1f1ec7a2012894c2e466537e6f157c77e53d2..a8158870f8ffac1ba1db8b6a418a22fef7ec3734 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
@@ -18,35 +18,17 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
stats = rendering_stats.RenderingStats(
renderer_process, model.browser_process,
[r.GetBounds() for r in interaction_records])
- if stats.mouse_wheel_scroll_latency:
- mean_mouse_wheel_scroll_latency = statistics.ArithmeticMean(
- stats.mouse_wheel_scroll_latency)
- mouse_wheel_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
- stats.mouse_wheel_scroll_latency)
- results.Add('mean_mouse_wheel_scroll_latency', 'ms',
- round(mean_mouse_wheel_scroll_latency, 3))
- results.Add('mouse_wheel_scroll_latency_discrepancy', 'ms',
- round(mouse_wheel_scroll_latency_discrepancy, 4))
- if stats.touch_scroll_latency:
- mean_touch_scroll_latency = statistics.ArithmeticMean(
- stats.touch_scroll_latency)
- touch_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
- stats.touch_scroll_latency)
- results.Add('mean_touch_scroll_latency', 'ms',
- round(mean_touch_scroll_latency, 3))
- results.Add('touch_scroll_latency_discrepancy', 'ms',
- round(touch_scroll_latency_discrepancy, 4))
-
- if stats.js_touch_scroll_latency:
- mean_js_touch_scroll_latency = statistics.ArithmeticMean(
- stats.js_touch_scroll_latency)
- js_touch_scroll_latency_discrepancy = statistics.DurationsDiscrepancy(
- stats.js_touch_scroll_latency)
- results.Add('mean_js_touch_scroll_latency', 'ms',
- round(mean_js_touch_scroll_latency, 3))
- results.Add('js_touch_scroll_latency_discrepancy', 'ms',
- round(js_touch_scroll_latency_discrepancy, 4))
+ input_event_latency = FlattenList(stats.input_event_latency)
+ if input_event_latency:
+ mean_input_event_latency = statistics.ArithmeticMean(
+ input_event_latency)
+ input_event_latency_discrepancy = statistics.DurationsDiscrepancy(
+ input_event_latency)
+ results.Add('mean_input_event_latency', 'ms',
+ round(mean_input_event_latency, 3))
+ results.Add('input_event_latency_discrepancy', 'ms',
+ round(input_event_latency_discrepancy, 4))
# List of raw frame times.
frame_times = FlattenList(stats.frame_times)
« no previous file with comments | « tools/telemetry/telemetry/web_perf/metrics/rendering_stats_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698