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 _BlinkPerfMeasurementSPInvalidation(_BlinkPerfMeasurement): | |
pdr.
2016/12/06 06:47:28
It's really long but WDYT of changing this to: _Bl
Xianzhu
2016/12/06 17:23:34
Done.
| |
123 def CustomizeBrowserOptions(self, options): | |
124 _BlinkPerfMeasurement.CustomizeBrowserOptions(self, options) | |
125 options.AppendExtraBrowserArgs([ | |
126 '--enable-blink-features=SlimmingPaintInvalidation' | |
127 ]) | |
128 | |
129 | |
122 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): | 130 class _SharedPywebsocketPageState(shared_page_state.SharedPageState): |
123 """Runs a pywebsocket server.""" | 131 """Runs a pywebsocket server.""" |
124 | 132 |
125 def __init__(self, test, finder_options, user_story_set): | 133 def __init__(self, test, finder_options, user_story_set): |
126 super(_SharedPywebsocketPageState, self).__init__( | 134 super(_SharedPywebsocketPageState, self).__init__( |
127 test, finder_options, user_story_set) | 135 test, finder_options, user_story_set) |
128 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) | 136 self.platform.StartLocalServer(pywebsocket_server.PywebsocketServer()) |
129 | 137 |
130 | 138 |
131 @benchmark.Disabled('all') # http://crbug.com/670069 | 139 @benchmark.Disabled('all') # http://crbug.com/670069 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 | 268 |
261 def CreateStorySet(self, options): | 269 def CreateStorySet(self, options): |
262 path = os.path.join(BLINK_PERF_BASE_DIR, 'Paint') | 270 path = os.path.join(BLINK_PERF_BASE_DIR, 'Paint') |
263 return CreateStorySetFromPath(path, SKIPPED_FILE) | 271 return CreateStorySetFromPath(path, SKIPPED_FILE) |
264 | 272 |
265 @classmethod | 273 @classmethod |
266 def ShouldDisable(cls, possible_browser): | 274 def ShouldDisable(cls, possible_browser): |
267 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 | 275 return cls.IsSvelte(possible_browser) # http://crbug.com/574483 |
268 | 276 |
269 | 277 |
278 class BlinkPerfPaintSPInvalidation(BlinkPerfPaint): | |
pdr.
2016/12/06 06:47:28
Can you add a link to either of the design docs an
Xianzhu
2016/12/06 17:23:34
I put the following doc in _BlinkPerfMeasurementSl
| |
279 tag = 'paint_spinvalidation' | |
280 test = _BlinkPerfMeasurementSPInvalidation | |
281 | |
282 @classmethod | |
283 def Name(cls): | |
284 return 'blink_perf.paint_spinvalidation' | |
285 | |
286 | |
270 @benchmark.Disabled('win') # crbug.com/488493 | 287 @benchmark.Disabled('win') # crbug.com/488493 |
271 class BlinkPerfParser(perf_benchmark.PerfBenchmark): | 288 class BlinkPerfParser(perf_benchmark.PerfBenchmark): |
272 tag = 'parser' | 289 tag = 'parser' |
273 test = _BlinkPerfMeasurement | 290 test = _BlinkPerfMeasurement |
274 | 291 |
275 @classmethod | 292 @classmethod |
276 def Name(cls): | 293 def Name(cls): |
277 return 'blink_perf.parser' | 294 return 'blink_perf.parser' |
278 | 295 |
279 def CreateStorySet(self, options): | 296 def CreateStorySet(self, options): |
280 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') | 297 path = os.path.join(BLINK_PERF_BASE_DIR, 'Parser') |
281 return CreateStorySetFromPath(path, SKIPPED_FILE) | 298 return CreateStorySetFromPath(path, SKIPPED_FILE) |
282 | 299 |
283 | 300 |
284 class BlinkPerfSVG(perf_benchmark.PerfBenchmark): | 301 class BlinkPerfSVG(perf_benchmark.PerfBenchmark): |
285 tag = 'svg' | 302 tag = 'svg' |
286 test = _BlinkPerfMeasurement | 303 test = _BlinkPerfMeasurement |
287 | 304 |
288 @classmethod | 305 @classmethod |
289 def Name(cls): | 306 def Name(cls): |
290 return 'blink_perf.svg' | 307 return 'blink_perf.svg' |
291 | 308 |
292 def CreateStorySet(self, options): | 309 def CreateStorySet(self, options): |
293 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') | 310 path = os.path.join(BLINK_PERF_BASE_DIR, 'SVG') |
294 return CreateStorySetFromPath(path, SKIPPED_FILE) | 311 return CreateStorySetFromPath(path, SKIPPED_FILE) |
295 | 312 |
296 | 313 |
314 class BlinkPerfSVGSPInvalidation(BlinkPerfSVG): | |
315 tag = 'svg_spinvalidation' | |
316 test = _BlinkPerfMeasurementSPInvalidation | |
317 | |
318 @classmethod | |
319 def Name(cls): | |
320 return 'blink_perf.svg_spinvalidation' | |
321 | |
322 | |
297 class BlinkPerfShadowDOM(perf_benchmark.PerfBenchmark): | 323 class BlinkPerfShadowDOM(perf_benchmark.PerfBenchmark): |
298 tag = 'shadow_dom' | 324 tag = 'shadow_dom' |
299 test = _BlinkPerfMeasurement | 325 test = _BlinkPerfMeasurement |
300 | 326 |
301 @classmethod | 327 @classmethod |
302 def Name(cls): | 328 def Name(cls): |
303 return 'blink_perf.shadow_dom' | 329 return 'blink_perf.shadow_dom' |
304 | 330 |
305 def CreateStorySet(self, options): | 331 def CreateStorySet(self, options): |
306 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') | 332 path = os.path.join(BLINK_PERF_BASE_DIR, 'ShadowDOM') |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 | 367 |
342 def CreateStorySet(self, options): | 368 def CreateStorySet(self, options): |
343 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') | 369 path = os.path.join(BLINK_PERF_BASE_DIR, 'Pywebsocket') |
344 return CreateStorySetFromPath( | 370 return CreateStorySetFromPath( |
345 path, SKIPPED_FILE, | 371 path, SKIPPED_FILE, |
346 shared_page_state_class=_SharedPywebsocketPageState) | 372 shared_page_state_class=_SharedPywebsocketPageState) |
347 | 373 |
348 @classmethod | 374 @classmethod |
349 def ShouldDisable(cls, possible_browser): | 375 def ShouldDisable(cls, possible_browser): |
350 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 | 376 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 |
OLD | NEW |