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

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

Issue 16213002: Add telemetry to track the time an event spent waiting for the main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor fixes 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 | Annotate | Revision Log
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, 'totalImplThreadToMainThreadCount',
163 'totalImplThreadToMainThreadTime',
164 'average_impl_thread_to_main_thread_time',
165 results)
162 166
163 class Smoothness(page_measurement.PageMeasurement): 167 class Smoothness(page_measurement.PageMeasurement):
164 def __init__(self): 168 def __init__(self):
165 super(Smoothness, self).__init__('smoothness') 169 super(Smoothness, self).__init__('smoothness')
166 self.force_enable_threaded_compositing = False 170 self.force_enable_threaded_compositing = False
167 self.use_gpu_benchmarking_extension = True 171 self.use_gpu_benchmarking_extension = True
168 self._metrics = None 172 self._metrics = None
169 173
170 def AddCommandLineOptions(self, parser): 174 def AddCommandLineOptions(self, parser):
171 parser.add_option('--report-all-results', dest='report_all_results', 175 parser.add_option('--report-all-results', dest='report_all_results',
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 226
223 if self.options.report_all_results: 227 if self.options.report_all_results:
224 for k, v in rendering_stats_deltas.iteritems(): 228 for k, v in rendering_stats_deltas.iteritems():
225 results.Add(k, '', v) 229 results.Add(k, '', v)
226 230
227 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 231 if tab.browser.platform.IsRawDisplayFrameRateSupported():
228 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): 232 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
229 if not r.value: 233 if not r.value:
230 raise MissingDisplayFrameRate() 234 raise MissingDisplayFrameRate()
231 results.Add(r.name, r.unit, r.value) 235 results.Add(r.name, r.unit, r.value)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698