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

Side by Side Diff: tools/perf/measurements/smoothness.py

Issue 18937002: Add UMA/Telemetry stats for end-to-end scroll latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 from perf_tools import smoothness_metrics 4 from perf_tools import smoothness_metrics
5 from telemetry.core import util 5 from telemetry.core import util
6 from telemetry.page import page_measurement 6 from telemetry.page import page_measurement
7 7
8 class DidNotScrollException(page_measurement.MeasurementFailure): 8 class DidNotScrollException(page_measurement.MeasurementFailure):
9 def __init__(self): 9 def __init__(self):
10 super(DidNotScrollException, self).__init__('Page did not scroll') 10 super(DidNotScrollException, self).__init__('Page did not scroll')
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 def CalcLatencyResults(rendering_stats_deltas, results): 153 def CalcLatencyResults(rendering_stats_deltas, results):
154 CalcLatency(rendering_stats_deltas, 'inputEventCount', 'totalInputLatency', 154 CalcLatency(rendering_stats_deltas, 'inputEventCount', 'totalInputLatency',
155 'average_latency', results) 155 'average_latency', results)
156 CalcLatency(rendering_stats_deltas, 'touchUICount', 'totalTouchUILatency', 156 CalcLatency(rendering_stats_deltas, 'touchUICount', 'totalTouchUILatency',
157 'average_touch_ui_latency', results) 157 'average_touch_ui_latency', results)
158 CalcLatency(rendering_stats_deltas, 'touchAckedCount', 158 CalcLatency(rendering_stats_deltas, 'touchAckedCount',
159 'totalTouchAckedLatency', 159 'totalTouchAckedLatency',
160 'average_touch_acked_latency', 160 'average_touch_acked_latency',
161 results) 161 results)
162 CalcLatency(rendering_stats_deltas, 'scrollEventCount', 'totalScrollLatency',
163 'average_scroll_latency', results)
162 164
163 class Smoothness(page_measurement.PageMeasurement): 165 class Smoothness(page_measurement.PageMeasurement):
164 def __init__(self): 166 def __init__(self):
165 super(Smoothness, self).__init__('smoothness') 167 super(Smoothness, self).__init__('smoothness')
166 self.force_enable_threaded_compositing = False 168 self.force_enable_threaded_compositing = False
167 self.use_gpu_benchmarking_extension = True 169 self.use_gpu_benchmarking_extension = True
168 self._metrics = None 170 self._metrics = None
169 171
170 def AddCommandLineOptions(self, parser): 172 def AddCommandLineOptions(self, parser):
171 parser.add_option('--report-all-results', dest='report_all_results', 173 parser.add_option('--report-all-results', dest='report_all_results',
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 224
223 if self.options.report_all_results: 225 if self.options.report_all_results:
224 for k, v in rendering_stats_deltas.iteritems(): 226 for k, v in rendering_stats_deltas.iteritems():
225 results.Add(k, '', v) 227 results.Add(k, '', v)
226 228
227 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 229 if tab.browser.platform.IsRawDisplayFrameRateSupported():
228 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): 230 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
229 if not r.value: 231 if not r.value:
230 raise MissingDisplayFrameRate() 232 raise MissingDisplayFrameRate()
231 results.Add(r.name, r.unit, r.value) 233 results.Add(r.name, r.unit, r.value)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698