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

Side by Side Diff: tools/perf/benchmarks/blink_perf.py

Issue 2552673004: Simplify blink_perf benchmark definitions (Closed)
Patch Set: Created 4 years 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 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 core import path_util 7 from core import path_util
8 from core import perf_benchmark 8 from core import perf_benchmark
9 9
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 """Measures blink perf with the new paint invalidation system (see: 123 """Measures blink perf with the new paint invalidation system (see:
124 https://goo.gl/eQczQW). The benchmarks using this measurement should be 124 https://goo.gl/eQczQW). The benchmarks using this measurement should be
125 removed when slimming paint invalidation ships.""" 125 removed when slimming paint invalidation ships."""
126 def CustomizeBrowserOptions(self, options): 126 def CustomizeBrowserOptions(self, options):
127 _BlinkPerfMeasurement.CustomizeBrowserOptions(self, options) 127 _BlinkPerfMeasurement.CustomizeBrowserOptions(self, options)
128 options.AppendExtraBrowserArgs([ 128 options.AppendExtraBrowserArgs([
129 '--enable-blink-features=SlimmingPaintInvalidation' 129 '--enable-blink-features=SlimmingPaintInvalidation'
130 ]) 130 ])
131 131
132 132
133 class _BlinkPerfBenchmark(perf_benchmark.PerfBenchmark):
134 test = _BlinkPerfMeasurement
135
136 @classmethod
137 def Name(cls):
138 return 'blink_perf.' + cls.tag
139
140 def CreateStorySet(self, options):
141 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir)
142 return CreateStorySetFromPath(path, SKIPPED_FILE)
143
144
133 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): 145 class _SharedPywebsocketPageState(shared_page_state.SharedPageState):
134 """Runs a pywebsocket server.""" 146 """Runs a pywebsocket server."""
135 147
136 def __init__(self, test, finder_options, user_story_set): 148 def __init__(self, test, finder_options, user_story_set):
137 super(_SharedPywebsocketPageState, self).__init__( 149 super(_SharedPywebsocketPageState, self).__init__(
138 test, finder_options, user_story_set) 150 test, finder_options, user_story_set)
139 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) 151 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer())
140 152
141 153
142 @benchmark.Disabled('all') # http://crbug.com/670069 154 @benchmark.Disabled('all') # http://crbug.com/670069
143 class BlinkPerfBindings(perf_benchmark.PerfBenchmark): 155 class BlinkPerfBindings(_BlinkPerfBenchmark):
144 tag = 'bindings' 156 tag = 'bindings'
145 test = _BlinkPerfMeasurement 157 subdir = 'Bindings'
146
147 @classmethod
148 def Name(cls):
149 return 'blink_perf.bindings'
150
151 def CreateStorySet(self, options):
152 path = os.path.join(BLINK_PERF_BASE_DIR, 'Bindings')
153 return CreateStorySetFromPath(path, SKIPPED_FILE)
154 158
155 @classmethod 159 @classmethod
156 def ShouldDisable(cls, possible_browser): 160 def ShouldDisable(cls, possible_browser):
157 # http://crbug.com/563979 161 # http://crbug.com/563979
158 return (cls.IsSvelte(possible_browser) 162 return (cls.IsSvelte(possible_browser)
159 # http://crbug.com/653970 163 # http://crbug.com/653970
160 or (possible_browser.browser_type == 'reference' and 164 or (possible_browser.browser_type == 'reference' and
161 possible_browser.platform.GetOSName() == 'android')) 165 possible_browser.platform.GetOSName() == 'android'))
162 166
163 167
164 @benchmark.Enabled('content-shell') 168 @benchmark.Enabled('content-shell')
165 class BlinkPerfBlinkGC(perf_benchmark.PerfBenchmark): 169 class BlinkPerfBlinkGC(_BlinkPerfBenchmark):
166 tag = 'blink_gc' 170 tag = 'blink_gc'
167 test = _BlinkPerfMeasurement 171 subdir = 'BlinkGC'
168
169 @classmethod
170 def Name(cls):
171 return 'blink_perf.blink_gc'
172
173 def CreateStorySet(self, options):
174 path = os.path.join(BLINK_PERF_BASE_DIR, 'BlinkGC')
175 return CreateStorySetFromPath(path, SKIPPED_FILE)
176 172
177 173
178 class BlinkPerfCSS(perf_benchmark.PerfBenchmark): 174 class BlinkPerfCSS(_BlinkPerfBenchmark):
179 tag = 'css' 175 tag = 'css'
180 test = _BlinkPerfMeasurement 176 subdir = 'CSS'
181
182 @classmethod
183 def Name(cls):
184 return 'blink_perf.css'
185
186 def CreateStorySet(self, options):
187 path = os.path.join(BLINK_PERF_BASE_DIR, 'CSS')
188 return CreateStorySetFromPath(path, SKIPPED_FILE)
189 177
190 178
191 @benchmark.Disabled('android-webview', # http://crbug.com/593200 179 @benchmark.Disabled('android-webview', # http://crbug.com/593200
192 'reference') # http://crbug.com/576779 180 'reference') # http://crbug.com/576779
193 class BlinkPerfCanvas(perf_benchmark.PerfBenchmark): 181 class BlinkPerfCanvas(_BlinkPerfBenchmark):
194 tag = 'canvas' 182 tag = 'canvas'
195 test = _BlinkPerfMeasurement 183 subdir = 'Canvas'
196 184
197 @classmethod 185 @classmethod
198 def ShouldDisable(cls, possible_browser): 186 def ShouldDisable(cls, possible_browser):
199 return cls.IsSvelte(possible_browser) # http://crbug.com/593973. 187 return cls.IsSvelte(possible_browser) # http://crbug.com/593973.
200 188
201 @classmethod
202 def Name(cls):
203 return 'blink_perf.canvas'
204
205 def CreateStorySet(self, options): 189 def CreateStorySet(self, options):
206 path = os.path.join(BLINK_PERF_BASE_DIR, 'Canvas') 190 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir)
207 story_set = CreateStorySetFromPath( 191 story_set = CreateStorySetFromPath(
208 path, SKIPPED_FILE, 192 path, SKIPPED_FILE,
209 shared_page_state_class=( 193 shared_page_state_class=(
210 webgl_supported_shared_state.WebGLSupportedSharedState)) 194 webgl_supported_shared_state.WebGLSupportedSharedState))
211 # WebGLSupportedSharedState requires the skipped_gpus property to 195 # WebGLSupportedSharedState requires the skipped_gpus property to
212 # be set on each page. 196 # be set on each page.
213 for page in story_set: 197 for page in story_set:
214 page.skipped_gpus = [] 198 page.skipped_gpus = []
215 return story_set 199 return story_set
216 200
217 201
218 class BlinkPerfDOM(perf_benchmark.PerfBenchmark): 202 class BlinkPerfDOM(_BlinkPerfBenchmark):
219 tag = 'dom' 203 tag = 'dom'
220 test = _BlinkPerfMeasurement 204 subdir = 'DOM'
221
222 @classmethod
223 def Name(cls):
224 return 'blink_perf.dom'
225
226 def CreateStorySet(self, options):
227 path = os.path.join(BLINK_PERF_BASE_DIR, 'DOM')
228 return CreateStorySetFromPath(path, SKIPPED_FILE)
229 205
230 206
231 @benchmark.Disabled('win') # http://crbug.com/588819 207 @benchmark.Disabled('win') # http://crbug.com/588819
232 class BlinkPerfEvents(perf_benchmark.PerfBenchmark): 208 class BlinkPerfEvents(_BlinkPerfBenchmark):
233 tag = 'events' 209 tag = 'events'
234 test = _BlinkPerfMeasurement 210 subdir = 'Events'
235
236 @classmethod
237 def Name(cls):
238 return 'blink_perf.events'
239
240 def CreateStorySet(self, options):
241 path = os.path.join(BLINK_PERF_BASE_DIR, 'Events')
242 return CreateStorySetFromPath(path, SKIPPED_FILE)
243 211
244 212
245 @benchmark.Disabled('win8') # http://crbug.com/462350 213 @benchmark.Disabled('win8') # http://crbug.com/462350
246 @benchmark.Disabled('win-reference') # http://crbug.com/642884 214 @benchmark.Disabled('win-reference') # http://crbug.com/642884
247 class BlinkPerfLayout(perf_benchmark.PerfBenchmark): 215 class BlinkPerfLayout(_BlinkPerfBenchmark):
248 tag = 'layout' 216 tag = 'layout'
249 test = _BlinkPerfMeasurement 217 subdir = 'Layout'
250
251 @classmethod
252 def Name(cls):
253 return 'blink_perf.layout'
254
255 def CreateStorySet(self, options):
256 path = os.path.join(BLINK_PERF_BASE_DIR, 'Layout')
257 return CreateStorySetFromPath(path, SKIPPED_FILE)
258 218
259 @classmethod 219 @classmethod
260 def ShouldDisable(cls, possible_browser): 220 def ShouldDisable(cls, possible_browser):
261 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 221 return cls.IsSvelte(possible_browser) # http://crbug.com/551950
262 222
263 223
264 class BlinkPerfPaint(perf_benchmark.PerfBenchmark): 224 class BlinkPerfPaint(_BlinkPerfBenchmark):
265 tag = 'paint' 225 tag = 'paint'
266 test = _BlinkPerfMeasurement 226 subdir = 'Paint'
267
268 @classmethod
269 def Name(cls):
270 return 'blink_perf.paint'
271
272 def CreateStorySet(self, options):
273 path = os.path.join(BLINK_PERF_BASE_DIR, 'Paint')
274 return CreateStorySetFromPath(path, SKIPPED_FILE)
275 227
276 @classmethod 228 @classmethod
277 def ShouldDisable(cls, possible_browser): 229 def ShouldDisable(cls, possible_browser):
278 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 230 return cls.IsSvelte(possible_browser) # http://crbug.com/574483
279 231
280 232
281 class BlinkPerfPaintSlimmingPaintInvalidation(BlinkPerfPaint): 233 class BlinkPerfPaintSlimmingPaintInvalidation(BlinkPerfPaint):
282 tag = 'paint_slimmingpaintinvalidation' 234 tag = 'paint_slimmingpaintinvalidation'
283 test = _BlinkPerfMeasurementSlimmingPaintInvalidation 235 test = _BlinkPerfMeasurementSlimmingPaintInvalidation
284 236
285 @classmethod 237
286 def Name(cls): 238 @benchmark.Disabled('win') # crbug.com/488493
287 return 'blink_perf.paint_slimmingpaintinvalidation' 239 class BlinkPerfParser(_BlinkPerfBenchmark):
240 tag = 'parser'
241 subdir = 'Parser'
288 242
289 243
290 @benchmark.Disabled('win') # crbug.com/488493 244 class BlinkPerfSVG(_BlinkPerfBenchmark):
291 class BlinkPerfParser(perf_benchmark.PerfBenchmark):
292 tag = 'parser'
293 test = _BlinkPerfMeasurement
294
295 @classmethod
296 def Name(cls):
297 return 'blink_perf.parser'
298
299 def CreateStorySet(self, options):
300 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser')
301 return CreateStorySetFromPath(path, SKIPPED_FILE)
302
303
304 class BlinkPerfSVG(perf_benchmark.PerfBenchmark):
305 tag = 'svg' 245 tag = 'svg'
306 test = _BlinkPerfMeasurement 246 subdir = 'SVG'
307
308 @classmethod
309 def Name(cls):
310 return 'blink_perf.svg'
311
312 def CreateStorySet(self, options):
313 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG')
314 return CreateStorySetFromPath(path, SKIPPED_FILE)
315 247
316 248
317 class BlinkPerfSVGSlimmingPaintInvalidation(BlinkPerfSVG): 249 class BlinkPerfSVGSlimmingPaintInvalidation(BlinkPerfSVG):
318 tag = 'svg_slimmingpaintinvalidation' 250 tag = 'svg_slimmingpaintinvalidation'
319 test = _BlinkPerfMeasurementSlimmingPaintInvalidation 251 test = _BlinkPerfMeasurementSlimmingPaintInvalidation
320 252
321 @classmethod
322 def Name(cls):
323 return 'blink_perf.svg_slimmingpaintinvalidation'
324 253
325 254 class BlinkPerfShadowDOM(_BlinkPerfBenchmark):
326 class BlinkPerfShadowDOM(perf_benchmark.PerfBenchmark):
327 tag = 'shadow_dom' 255 tag = 'shadow_dom'
328 test = _BlinkPerfMeasurement 256 subdir = 'ShadowDOM'
329
330 @classmethod
331 def Name(cls):
332 return 'blink_perf.shadow_dom'
333
334 def CreateStorySet(self, options):
335 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM')
336 return CreateStorySetFromPath(path, SKIPPED_FILE)
337 257
338 258
339 # This benchmark is for local testing, doesn't need to run on bots. 259 # This benchmark is for local testing, doesn't need to run on bots.
340 @benchmark.Disabled('all') 260 @benchmark.Disabled('all')
341 class BlinkPerfXMLHttpRequest(perf_benchmark.PerfBenchmark): 261 class BlinkPerfXMLHttpRequest(_BlinkPerfBenchmark):
342 tag = 'xml_http_request' 262 tag = 'xml_http_request'
343 test = _BlinkPerfMeasurement 263 subdir = 'XMLHttpRequest'
344
345 @classmethod
346 def Name(cls):
347 return 'blink_perf.xml_http_request'
348
349 def CreateStorySet(self, options):
350 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest')
351 return CreateStorySetFromPath(path, SKIPPED_FILE)
352 264
353 265
354 # Disabled on Windows and ChromeOS due to https://crbug.com/521887 266 # Disabled on Windows and ChromeOS due to https://crbug.com/521887
355 #@benchmark.Disabled('win', 'chromeos') 267 #@benchmark.Disabled('win', 'chromeos')
356 # Disabling on remaining platforms due to heavy flake https://crbug.com/646938 268 # Disabling on remaining platforms due to heavy flake https://crbug.com/646938
357 @benchmark.Disabled('all') 269 @benchmark.Disabled('all')
358 class BlinkPerfPywebsocket(perf_benchmark.PerfBenchmark): 270 class BlinkPerfPywebsocket(_BlinkPerfBenchmark):
359 """The blink_perf.pywebsocket tests measure turn-around-time of 10MB 271 """The blink_perf.pywebsocket tests measure turn-around-time of 10MB
360 send/receive for XHR, Fetch API and WebSocket. We might ignore < 10% 272 send/receive for XHR, Fetch API and WebSocket. We might ignore < 10%
361 regressions, because the tests are noisy and such regressions are 273 regressions, because the tests are noisy and such regressions are
362 often unreproducible (https://crbug.com/549017). 274 often unreproducible (https://crbug.com/549017).
363 """ 275 """
364 tag = 'pywebsocket' 276 tag = 'pywebsocket'
365 test = _BlinkPerfMeasurement 277 subdir = 'Pywebsocket'
366
367 @classmethod
368 def Name(cls):
369 return 'blink_perf.pywebsocket'
370 278
371 def CreateStorySet(self, options): 279 def CreateStorySet(self, options):
372 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') 280 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir)
373 return CreateStorySetFromPath( 281 return CreateStorySetFromPath(
374 path, SKIPPED_FILE, 282 path, SKIPPED_FILE,
375 shared_page_state_class=_SharedPywebsocketPageState) 283 shared_page_state_class=_SharedPywebsocketPageState)
376 284
377 @classmethod 285 @classmethod
378 def ShouldDisable(cls, possible_browser): 286 def ShouldDisable(cls, possible_browser):
379 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 287 return cls.IsSvelte(possible_browser) # http://crbug.com/551950
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