| 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 | |
| 133 class _BlinkPerfBenchmark(perf_benchmark.PerfBenchmark): | 122 class _BlinkPerfBenchmark(perf_benchmark.PerfBenchmark): |
| 134 test = _BlinkPerfMeasurement | 123 test = _BlinkPerfMeasurement |
| 135 | 124 |
| 136 @classmethod | 125 @classmethod |
| 137 def Name(cls): | 126 def Name(cls): |
| 138 return 'blink_perf.' + cls.tag | 127 return 'blink_perf.' + cls.tag |
| 139 | 128 |
| 140 def CreateStorySet(self, options): | 129 def CreateStorySet(self, options): |
| 141 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) | 130 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) |
| 142 return CreateStorySetFromPath(path, SKIPPED_FILE) | 131 return CreateStorySetFromPath(path, SKIPPED_FILE) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 211 |
| 223 class BlinkPerfPaint(_BlinkPerfBenchmark): | 212 class BlinkPerfPaint(_BlinkPerfBenchmark): |
| 224 tag = 'paint' | 213 tag = 'paint' |
| 225 subdir = 'Paint' | 214 subdir = 'Paint' |
| 226 | 215 |
| 227 @classmethod | 216 @classmethod |
| 228 def ShouldDisable(cls, possible_browser): | 217 def ShouldDisable(cls, possible_browser): |
| 229 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 | 218 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 |
| 230 | 219 |
| 231 | 220 |
| 232 class BlinkPerfPaintSlimmingPaintInvalidation(BlinkPerfPaint): | |
| 233 tag = 'paint_slimmingpaintinvalidation' | |
| 234 test = _BlinkPerfMeasurementSlimmingPaintInvalidation | |
| 235 | |
| 236 | |
| 237 @benchmark.Disabled('win') # crbug.com/488493 | 221 @benchmark.Disabled('win') # crbug.com/488493 |
| 238 class BlinkPerfParser(_BlinkPerfBenchmark): | 222 class BlinkPerfParser(_BlinkPerfBenchmark): |
| 239 tag = 'parser' | 223 tag = 'parser' |
| 240 subdir = 'Parser' | 224 subdir = 'Parser' |
| 241 | 225 |
| 242 | 226 |
| 243 class BlinkPerfSVG(_BlinkPerfBenchmark): | 227 class BlinkPerfSVG(_BlinkPerfBenchmark): |
| 244 tag = 'svg' | 228 tag = 'svg' |
| 245 subdir = 'SVG' | 229 subdir = 'SVG' |
| 246 | 230 |
| 247 | 231 |
| 248 class BlinkPerfSVGSlimmingPaintInvalidation(BlinkPerfSVG): | |
| 249 tag = 'svg_slimmingpaintinvalidation' | |
| 250 test = _BlinkPerfMeasurementSlimmingPaintInvalidation | |
| 251 | |
| 252 | |
| 253 class BlinkPerfShadowDOM(_BlinkPerfBenchmark): | 232 class BlinkPerfShadowDOM(_BlinkPerfBenchmark): |
| 254 tag = 'shadow_dom' | 233 tag = 'shadow_dom' |
| 255 subdir = 'ShadowDOM' | 234 subdir = 'ShadowDOM' |
| 256 | 235 |
| 257 | 236 |
| 258 # This benchmark is for local testing, doesn't need to run on bots. | 237 # This benchmark is for local testing, doesn't need to run on bots. |
| 259 @benchmark.Disabled('all') | 238 @benchmark.Disabled('all') |
| 260 class BlinkPerfXMLHttpRequest(_BlinkPerfBenchmark): | 239 class BlinkPerfXMLHttpRequest(_BlinkPerfBenchmark): |
| 261 tag = 'xml_http_request' | 240 tag = 'xml_http_request' |
| 262 subdir = 'XMLHttpRequest' | 241 subdir = 'XMLHttpRequest' |
| (...skipping 14 matching lines...) Expand all Loading... |
| 277 | 256 |
| 278 def CreateStorySet(self, options): | 257 def CreateStorySet(self, options): |
| 279 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) | 258 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) |
| 280 return CreateStorySetFromPath( | 259 return CreateStorySetFromPath( |
| 281 path, SKIPPED_FILE, | 260 path, SKIPPED_FILE, |
| 282 shared_page_state_class=_SharedPywebsocketPageState) | 261 shared_page_state_class=_SharedPywebsocketPageState) |
| 283 | 262 |
| 284 @classmethod | 263 @classmethod |
| 285 def ShouldDisable(cls, possible_browser): | 264 def ShouldDisable(cls, possible_browser): |
| 286 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 | 265 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 |
| OLD | NEW |