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/benchmarks/blink_perf.py

Issue 681493002: Add full frame measurement mode for some blink_perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming: 'full_layout' -> 'full_frame' Created 6 years, 1 month 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/telemetry/telemetry/decorators.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 4
5 import os 5 import os
6 6
7 from telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry.core import util 8 from telemetry.core import util
9 from telemetry.page import page_set 9 from telemetry.page import page_set
10 from telemetry.page import page_test 10 from telemetry.page import page_test
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 units = parts[-1] 90 units = parts[-1]
91 metric = page.display_name.split('.')[0].replace('/', '_') 91 metric = page.display_name.split('.')[0].replace('/', '_')
92 results.AddValue(list_of_scalar_values.ListOfScalarValues( 92 results.AddValue(list_of_scalar_values.ListOfScalarValues(
93 results.current_page, metric, units, values)) 93 results.current_page, metric, units, values))
94 94
95 break 95 break
96 96
97 print log 97 print log
98 98
99 99
100 class _BlinkPerfFullFrameMeasurement(_BlinkPerfMeasurement):
101 def __init__(self):
102 super(_BlinkPerfFullFrameMeasurement, self).__init__()
103 self._blink_perf_js += '\nwindow.fullFrameMeasurement = true;'
104
105 def CustomizeBrowserOptions(self, options):
106 super(_BlinkPerfFullFrameMeasurement, self).CustomizeBrowserOptions(
107 options)
108 # Full layout measurement needs content_shell with internals testing API.
109 assert 'content-shell' in options.browser_type
110 options.AppendExtraBrowserArgs(['--expose-internals-for-testing'])
111
112
100 class BlinkPerfAnimation(benchmark.Benchmark): 113 class BlinkPerfAnimation(benchmark.Benchmark):
101 tag = 'animation' 114 tag = 'animation'
102 test = _BlinkPerfMeasurement 115 test = _BlinkPerfMeasurement
103 116
104 def CreatePageSet(self, options): 117 def CreatePageSet(self, options):
105 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation') 118 path = os.path.join(BLINK_PERF_BASE_DIR, 'Animation')
106 return _CreatePageSetFromPath(path, SKIPPED_FILE) 119 return _CreatePageSetFromPath(path, SKIPPED_FILE)
107 120
108 121
109 class BlinkPerfBindings(benchmark.Benchmark): 122 class BlinkPerfBindings(benchmark.Benchmark):
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 175
163 class BlinkPerfLayout(benchmark.Benchmark): 176 class BlinkPerfLayout(benchmark.Benchmark):
164 tag = 'layout' 177 tag = 'layout'
165 test = _BlinkPerfMeasurement 178 test = _BlinkPerfMeasurement
166 179
167 def CreatePageSet(self, options): 180 def CreatePageSet(self, options):
168 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout') 181 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout')
169 return _CreatePageSetFromPath(path, SKIPPED_FILE) 182 return _CreatePageSetFromPath(path, SKIPPED_FILE)
170 183
171 184
185 @benchmark.Enabled('content-shell')
186 class BlinkPerfLayoutFullLayout(BlinkPerfLayout):
187 tag = 'layout_full_frame'
188 test = _BlinkPerfFullFrameMeasurement
189
190
172 class BlinkPerfMutation(benchmark.Benchmark): 191 class BlinkPerfMutation(benchmark.Benchmark):
173 tag = 'mutation' 192 tag = 'mutation'
174 test = _BlinkPerfMeasurement 193 test = _BlinkPerfMeasurement
175 194
176 def CreatePageSet(self, options): 195 def CreatePageSet(self, options):
177 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation') 196 path = os.path.join(BLINK_PERF_BASE_DIR, 'Mutation')
178 return _CreatePageSetFromPath(path, SKIPPED_FILE) 197 return _CreatePageSetFromPath(path, SKIPPED_FILE)
179 198
180 199
181 class BlinkPerfParser(benchmark.Benchmark): 200 class BlinkPerfParser(benchmark.Benchmark):
182 tag = 'parser' 201 tag = 'parser'
183 test = _BlinkPerfMeasurement 202 test = _BlinkPerfMeasurement
184 203
185 def CreatePageSet(self, options): 204 def CreatePageSet(self, options):
186 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') 205 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser')
187 return _CreatePageSetFromPath(path, SKIPPED_FILE) 206 return _CreatePageSetFromPath(path, SKIPPED_FILE)
188 207
189 208
190 class BlinkPerfSVG(benchmark.Benchmark): 209 class BlinkPerfSVG(benchmark.Benchmark):
191 tag = 'svg' 210 tag = 'svg'
192 test = _BlinkPerfMeasurement 211 test = _BlinkPerfMeasurement
193 212
194 def CreatePageSet(self, options): 213 def CreatePageSet(self, options):
195 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') 214 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG')
196 return _CreatePageSetFromPath(path, SKIPPED_FILE) 215 return _CreatePageSetFromPath(path, SKIPPED_FILE)
197 216
198 217
218 @benchmark.Enabled('content-shell')
219 class BlinkPerfSVGFullLayout(BlinkPerfSVG):
220 tag = 'svg_full_frame'
221 test = _BlinkPerfFullFrameMeasurement
222
223
199 class BlinkPerfShadowDOM(benchmark.Benchmark): 224 class BlinkPerfShadowDOM(benchmark.Benchmark):
200 tag = 'shadow_dom' 225 tag = 'shadow_dom'
201 test = _BlinkPerfMeasurement 226 test = _BlinkPerfMeasurement
202 227
203 def CreatePageSet(self, options): 228 def CreatePageSet(self, options):
204 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') 229 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM')
205 return _CreatePageSetFromPath(path, SKIPPED_FILE) 230 return _CreatePageSetFromPath(path, SKIPPED_FILE)
206 231
207 232
208 class BlinkPerfXMLHttpRequest(benchmark.Benchmark): 233 class BlinkPerfXMLHttpRequest(benchmark.Benchmark):
209 tag = 'xml_http_request' 234 tag = 'xml_http_request'
210 test = _BlinkPerfMeasurement 235 test = _BlinkPerfMeasurement
211 236
212 def CreatePageSet(self, options): 237 def CreatePageSet(self, options):
213 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') 238 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest')
214 return _CreatePageSetFromPath(path, SKIPPED_FILE) 239 return _CreatePageSetFromPath(path, SKIPPED_FILE)
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/decorators.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698