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

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

Issue 23506030: telemetry: Add new metrics to smoothness benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replaced 'score' by inverse RMS frame time. Created 7 years, 3 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
« no previous file with comments | « no previous file | tools/perf/metrics/discrepancy.py » ('j') | tools/perf/metrics/smoothness.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 metrics import loading 4 from metrics import loading
5 from metrics import smoothness 5 from metrics import smoothness
6 from metrics.gpu_rendering_stats import GpuRenderingStats 6 from metrics.gpu_rendering_stats import GpuRenderingStats
7 from telemetry.page import page_measurement 7 from telemetry.page import page_measurement
8 8
9 class DidNotScrollException(page_measurement.MeasurementFailure): 9 class DidNotScrollException(page_measurement.MeasurementFailure):
10 def __init__(self): 10 def __init__(self):
(...skipping 17 matching lines...) Expand all
28 28
29 def CustomizeBrowserOptions(self, options): 29 def CustomizeBrowserOptions(self, options):
30 smoothness.SmoothnessMetrics.CustomizeBrowserOptions(options) 30 smoothness.SmoothnessMetrics.CustomizeBrowserOptions(options)
31 if self.force_enable_threaded_compositing: 31 if self.force_enable_threaded_compositing:
32 options.extra_browser_args.append('--enable-threaded-compositing') 32 options.extra_browser_args.append('--enable-threaded-compositing')
33 33
34 def CanRunForPage(self, page): 34 def CanRunForPage(self, page):
35 return hasattr(page, 'smoothness') 35 return hasattr(page, 'smoothness')
36 36
37 def WillRunAction(self, page, tab, action): 37 def WillRunAction(self, page, tab, action):
38 tab.browser.StartTracing('webkit,cc,benchmark', 60) 38 tab.browser.StartTracing('webkit,benchmark', 60)
39 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 39 if tab.browser.platform.IsRawDisplayFrameRateSupported():
40 tab.browser.platform.StartRawDisplayFrameRateMeasurement() 40 tab.browser.platform.StartRawDisplayFrameRateMeasurement()
41 self._metrics = smoothness.SmoothnessMetrics(tab) 41 self._metrics = smoothness.SmoothnessMetrics(tab)
42 if action.CanBeBound(): 42 if action.CanBeBound():
43 self._metrics.BindToAction(action) 43 self._metrics.BindToAction(action)
44 else: 44 else:
45 self._metrics.Start() 45 self._metrics.Start()
46 46
47 def DidRunAction(self, page, tab, action): 47 def DidRunAction(self, page, tab, action):
48 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 48 if tab.browser.platform.IsRawDisplayFrameRateSupported():
(...skipping 30 matching lines...) Expand all
79 79
80 if self.options.report_all_results: 80 if self.options.report_all_results:
81 for k, v in rendering_stats_deltas.iteritems(): 81 for k, v in rendering_stats_deltas.iteritems():
82 results.Add(k, '', v) 82 results.Add(k, '', v)
83 83
84 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 84 if tab.browser.platform.IsRawDisplayFrameRateSupported():
85 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): 85 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
86 if r.value is None: 86 if r.value is None:
87 raise MissingDisplayFrameRate(r.name) 87 raise MissingDisplayFrameRate(r.name)
88 results.Add(r.name, r.unit, r.value) 88 results.Add(r.name, r.unit, r.value)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/metrics/discrepancy.py » ('j') | tools/perf/metrics/smoothness.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698