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

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

Issue 23757054: telemetry: Add 'webkit' category back to smoothness benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment to remove 'webkit' category later. 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 | no next file » | no next file with comments »
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 9
10 class DidNotScrollException(page_measurement.MeasurementFailure): 10 class DidNotScrollException(page_measurement.MeasurementFailure):
(...skipping 26 matching lines...) Expand all
37 37
38 def CustomizeBrowserOptions(self, options): 38 def CustomizeBrowserOptions(self, options):
39 smoothness.SmoothnessMetrics.CustomizeBrowserOptions(options) 39 smoothness.SmoothnessMetrics.CustomizeBrowserOptions(options)
40 if self.force_enable_threaded_compositing: 40 if self.force_enable_threaded_compositing:
41 options.AppendExtraBrowserArgs('--enable-threaded-compositing') 41 options.AppendExtraBrowserArgs('--enable-threaded-compositing')
42 42
43 def CanRunForPage(self, page): 43 def CanRunForPage(self, page):
44 return hasattr(page, 'smoothness') 44 return hasattr(page, 'smoothness')
45 45
46 def WillRunAction(self, page, tab, action): 46 def WillRunAction(self, page, tab, action):
47 tab.browser.StartTracing('webkit.console,benchmark', 60) 47 # TODO(ermst): Remove "webkit" category after Blink r157377 is picked up by
48 # the reference builds.
49 tab.browser.StartTracing('webkit,webkit.console,benchmark', 60)
48 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 50 if tab.browser.platform.IsRawDisplayFrameRateSupported():
49 tab.browser.platform.StartRawDisplayFrameRateMeasurement() 51 tab.browser.platform.StartRawDisplayFrameRateMeasurement()
50 self._metrics = smoothness.SmoothnessMetrics(tab) 52 self._metrics = smoothness.SmoothnessMetrics(tab)
51 if action.CanBeBound(): 53 if action.CanBeBound():
52 self._metrics.BindToAction(action) 54 self._metrics.BindToAction(action)
53 else: 55 else:
54 self._metrics.Start() 56 self._metrics.Start()
55 57
56 def DidRunAction(self, page, tab, action): 58 def DidRunAction(self, page, tab, action):
57 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 59 if tab.browser.platform.IsRawDisplayFrameRateSupported():
(...skipping 30 matching lines...) Expand all
88 90
89 if self.options.report_all_results: 91 if self.options.report_all_results:
90 for k, v in rendering_stats_deltas.iteritems(): 92 for k, v in rendering_stats_deltas.iteritems():
91 results.Add(k, '', v) 93 results.Add(k, '', v)
92 94
93 if tab.browser.platform.IsRawDisplayFrameRateSupported(): 95 if tab.browser.platform.IsRawDisplayFrameRateSupported():
94 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements(): 96 for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
95 if r.value is None: 97 if r.value is None:
96 raise MissingDisplayFrameRate(r.name) 98 raise MissingDisplayFrameRate(r.name)
97 results.Add(r.name, r.unit, r.value) 99 results.Add(r.name, r.unit, r.value)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698