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

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/smoothness.py

Issue 397663002: Addition of first_gesture_scroll_latency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming of new metric Created 6 years, 5 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 6bde6d6bb714ed3c88022d525879b3148bb709fd..0e9f37a5be46fbf09852849954abe969d457a15b 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/smoothness.py
@@ -22,6 +22,7 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
[r.GetBounds() for r in interaction_records])
input_event_latency = FlattenList(stats.input_event_latency)
+
if input_event_latency:
mean_input_event_latency = statistics.ArithmeticMean(
input_event_latency)
@@ -34,7 +35,21 @@ class SmoothnessMetric(timeline_based_metric.TimelineBasedMetric):
results.current_page, 'input_event_latency_discrepancy', 'ms',
round(input_event_latency_discrepancy, 4)))
- # List of queueing durations.
+ input_start_and_latency_GSU = FlattenList(stats.input_start_and_latency_GSU)
nduca 2014/08/01 19:21:26 specifically should we have tests for the smoothne
jdduke (slow) 2014/08/09 01:58:50 Hmm, looks like the smoothness metric lacks unit t
+
+ if input_start_and_latency_GSU:
+ first_GSU_event = min(
+ input_start_and_latency_GSU,
+ key = lambda event:event.start_time)
+
+ results.AddValue(scalar.ScalarValue(
+ results.current_page,
+ 'first_gesture_scroll_latency',
+ 'ms',
+ round(first_GSU_event.latency, 4)))
+
+ # List of queueing durations
+
frame_queueing_durations = FlattenList(stats.frame_queueing_durations)
if frame_queueing_durations:
results.AddValue(list_of_scalar_values.ListOfScalarValues(
« 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