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

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

Issue 392613002: Telemetry: Initialize smoothness and thread_times metrics before page load, not after. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split Start into SetUp and Start for smoothness and timeline controller. Created 6 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
« no previous file with comments | « tools/perf/measurements/loading_trace.py ('k') | tools/perf/measurements/smoothness.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 4
5 from measurements import smoothness_controller 5 from measurements import smoothness_controller
6 from telemetry.page import page_measurement 6 from telemetry.page import page_measurement
7 7
8 8
9 class Repaint(page_measurement.PageMeasurement): 9 class Repaint(page_measurement.PageMeasurement):
10 def __init__(self): 10 def __init__(self):
(...skipping 17 matching lines...) Expand all
28 def CustomizeBrowserOptions(self, options): 28 def CustomizeBrowserOptions(self, options):
29 options.AppendExtraBrowserArgs([ 29 options.AppendExtraBrowserArgs([
30 '--enable-impl-side-painting', 30 '--enable-impl-side-painting',
31 '--enable-threaded-compositing', 31 '--enable-threaded-compositing',
32 '--enable-gpu-benchmarking' 32 '--enable-gpu-benchmarking'
33 ]) 33 ])
34 34
35 def WillRunActions(self, page, tab): 35 def WillRunActions(self, page, tab):
36 tab.WaitForDocumentReadyStateToBeComplete() 36 tab.WaitForDocumentReadyStateToBeComplete()
37 self._smoothness_controller = smoothness_controller.SmoothnessController() 37 self._smoothness_controller = smoothness_controller.SmoothnessController()
38 self._smoothness_controller.Start(page, tab) 38 self._smoothness_controller.SetUp(page, tab)
39 self._smoothness_controller.Start(tab)
39 # Rasterize only what's visible. 40 # Rasterize only what's visible.
40 tab.ExecuteJavaScript( 41 tab.ExecuteJavaScript(
41 'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();') 42 'chrome.gpuBenchmarking.setRasterizeOnlyVisibleContent();')
42 43
43 args = {} 44 args = {}
44 args['mode'] = self.options.mode 45 args['mode'] = self.options.mode
45 if self.options.width: 46 if self.options.width:
46 args['width'] = self.options.width 47 args['width'] = self.options.width
47 if self.options.height: 48 if self.options.height:
48 args['height'] = self.options.height 49 args['height'] = self.options.height
(...skipping 23 matching lines...) Expand all
72 "notify_done": true 73 "notify_done": true
73 }); 74 });
74 """) 75 """)
75 self._smoothness_controller.Stop(tab) 76 self._smoothness_controller.Stop(tab)
76 77
77 def MeasurePage(self, page, tab, results): 78 def MeasurePage(self, page, tab, results):
78 self._smoothness_controller.AddResults(tab, results) 79 self._smoothness_controller.AddResults(tab, results)
79 80
80 def CleanUpAfterPage(self, _, tab): 81 def CleanUpAfterPage(self, _, tab):
81 self._smoothness_controller.CleanUp(tab) 82 self._smoothness_controller.CleanUp(tab)
OLDNEW
« no previous file with comments | « tools/perf/measurements/loading_trace.py ('k') | tools/perf/measurements/smoothness.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698