Chromium Code Reviews| 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( |