OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 units = parts[-1] | 112 units = parts[-1] |
113 metric = page.display_name.split('.')[0].replace('/', '_') | 113 metric = page.display_name.split('.')[0].replace('/', '_') |
114 results.AddValue(list_of_scalar_values.ListOfScalarValues( | 114 results.AddValue(list_of_scalar_values.ListOfScalarValues( |
115 results.current_page, metric, units, values)) | 115 results.current_page, metric, units, values)) |
116 | 116 |
117 break | 117 break |
118 | 118 |
119 print log | 119 print log |
120 | 120 |
121 | 121 |
| 122 class _BlinkPerfMeasurementSlimmingPaintInvalidation(_BlinkPerfMeasurement): |
| 123 """Measures blink perf with the new paint invalidation system (see: |
| 124 https://goo.gl/eQczQW). The benchmarks using this measurement should be |
| 125 removed when slimming paint invalidation ships.""" |
| 126 def CustomizeBrowserOptions(self, options): |
| 127 _BlinkPerfMeasurement.CustomizeBrowserOptions(self, options) |
| 128 options.AppendExtraBrowserArgs([ |
| 129 '--enable-blink-features=SlimmingPaintInvalidation' |
| 130 ]) |
| 131 |
| 132 |
122 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): | 133 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): |
123 """Runs a pywebsocket server.""" | 134 """Runs a pywebsocket server.""" |
124 | 135 |
125 def __init__(self, test, finder_options, user_story_set): | 136 def __init__(self, test, finder_options, user_story_set): |
126 super(_SharedPywebsocketPageState, self).__init__( | 137 super(_SharedPywebsocketPageState, self).__init__( |
127 test, finder_options, user_story_set) | 138 test, finder_options, user_story_set) |
128 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) | 139 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) |
129 | 140 |
130 | 141 |
131 @benchmark.Disabled('all') # http://crbug.com/670069 | 142 @benchmark.Disabled('all') # http://crbug.com/670069 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 271 |
261 def CreateStorySet(self, options): | 272 def CreateStorySet(self, options): |
262 path = os.path.join(BLINK_PERF_BASE_DIR, 'Paint') | 273 path = os.path.join(BLINK_PERF_BASE_DIR, 'Paint') |
263 return CreateStorySetFromPath(path, SKIPPED_FILE) | 274 return CreateStorySetFromPath(path, SKIPPED_FILE) |
264 | 275 |
265 @classmethod | 276 @classmethod |
266 def ShouldDisable(cls, possible_browser): | 277 def ShouldDisable(cls, possible_browser): |
267 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 | 278 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 |
268 | 279 |
269 | 280 |
| 281 class BlinkPerfPaintSlimmingPaintInvalidation(BlinkPerfPaint): |
| 282 tag = 'paint_slimmingpaintinvalidation' |
| 283 test = _BlinkPerfMeasurementSlimmingPaintInvalidation |
| 284 |
| 285 @classmethod |
| 286 def Name(cls): |
| 287 return 'blink_perf.paint_slimmingpaintinvalidation' |
| 288 |
| 289 |
270 @benchmark.Disabled('win') # crbug.com/488493 | 290 @benchmark.Disabled('win') # crbug.com/488493 |
271 class BlinkPerfParser(perf_benchmark.PerfBenchmark): | 291 class BlinkPerfParser(perf_benchmark.PerfBenchmark): |
272 tag = 'parser' | 292 tag = 'parser' |
273 test = _BlinkPerfMeasurement | 293 test = _BlinkPerfMeasurement |
274 | 294 |
275 @classmethod | 295 @classmethod |
276 def Name(cls): | 296 def Name(cls): |
277 return 'blink_perf.parser' | 297 return 'blink_perf.parser' |
278 | 298 |
279 def CreateStorySet(self, options): | 299 def CreateStorySet(self, options): |
280 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') | 300 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') |
281 return CreateStorySetFromPath(path, SKIPPED_FILE) | 301 return CreateStorySetFromPath(path, SKIPPED_FILE) |
282 | 302 |
283 | 303 |
284 class BlinkPerfSVG(perf_benchmark.PerfBenchmark): | 304 class BlinkPerfSVG(perf_benchmark.PerfBenchmark): |
285 tag = 'svg' | 305 tag = 'svg' |
286 test = _BlinkPerfMeasurement | 306 test = _BlinkPerfMeasurement |
287 | 307 |
288 @classmethod | 308 @classmethod |
289 def Name(cls): | 309 def Name(cls): |
290 return 'blink_perf.svg' | 310 return 'blink_perf.svg' |
291 | 311 |
292 def CreateStorySet(self, options): | 312 def CreateStorySet(self, options): |
293 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') | 313 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') |
294 return CreateStorySetFromPath(path, SKIPPED_FILE) | 314 return CreateStorySetFromPath(path, SKIPPED_FILE) |
295 | 315 |
296 | 316 |
| 317 class BlinkPerfSVGSlimmingPaintInvalidation(BlinkPerfSVG): |
| 318 tag = 'svg_slimmingpaintinvalidation' |
| 319 test = _BlinkPerfMeasurementSlimmingPaintInvalidation |
| 320 |
| 321 @classmethod |
| 322 def Name(cls): |
| 323 return 'blink_perf.svg_slimmingpaintinvalidation' |
| 324 |
| 325 |
297 class BlinkPerfShadowDOM(perf_benchmark.PerfBenchmark): | 326 class BlinkPerfShadowDOM(perf_benchmark.PerfBenchmark): |
298 tag = 'shadow_dom' | 327 tag = 'shadow_dom' |
299 test = _BlinkPerfMeasurement | 328 test = _BlinkPerfMeasurement |
300 | 329 |
301 @classmethod | 330 @classmethod |
302 def Name(cls): | 331 def Name(cls): |
303 return 'blink_perf.shadow_dom' | 332 return 'blink_perf.shadow_dom' |
304 | 333 |
305 def CreateStorySet(self, options): | 334 def CreateStorySet(self, options): |
306 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') | 335 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 370 |
342 def CreateStorySet(self, options): | 371 def CreateStorySet(self, options): |
343 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') | 372 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') |
344 return CreateStorySetFromPath( | 373 return CreateStorySetFromPath( |
345 path, SKIPPED_FILE, | 374 path, SKIPPED_FILE, |
346 shared_page_state_class=_SharedPywebsocketPageState) | 375 shared_page_state_class=_SharedPywebsocketPageState) |
347 | 376 |
348 @classmethod | 377 @classmethod |
349 def ShouldDisable(cls, possible_browser): | 378 def ShouldDisable(cls, possible_browser): |
350 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 | 379 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 |
OLD | NEW |