Chromium Code Reviews| 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 import multiprocessing | 4 import multiprocessing |
| 5 | 5 |
| 6 from core import perf_benchmark | 6 from core import perf_benchmark |
| 7 | 7 |
| 8 from benchmarks import silk_flags | 8 from benchmarks import silk_flags |
| 9 from measurements import smoothness | 9 from measurements import smoothness |
| 10 import page_sets | 10 import page_sets |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 def CreateStorySet(self, options): | 171 def CreateStorySet(self, options): |
| 172 stories = super(SmoothnessKeySilkCases, self).CreateStorySet(options) | 172 stories = super(SmoothnessKeySilkCases, self).CreateStorySet(options) |
| 173 # Page26 (befamous) is too noisy to be useful; crbug.com/461127 | 173 # Page26 (befamous) is too noisy to be useful; crbug.com/461127 |
| 174 to_remove = [story for story in stories | 174 to_remove = [story for story in stories |
| 175 if isinstance(story, page_sets.key_silk_cases.Page26)] | 175 if isinstance(story, page_sets.key_silk_cases.Page26)] |
| 176 for story in to_remove: | 176 for story in to_remove: |
| 177 stories.RemoveStory(story) | 177 stories.RemoveStory(story) |
| 178 return stories | 178 return stories |
| 179 | 179 |
| 180 | 180 |
| 181 @benchmark.Enabled('android', 'mac') | 181 @benchmark.Enabled('android') |
| 182 class SmoothnessGpuRasterizationTop25(_Smoothness): | 182 class SmoothnessGpuRasterizationTop25(_Smoothness): |
| 183 """Measures rendering statistics for the top 25 with GPU rasterization. | 183 """Measures rendering statistics for the top 25 with GPU rasterization. |
| 184 """ | 184 """ |
| 185 tag = 'gpu_rasterization' | 185 tag = 'gpu_rasterization' |
| 186 page_set = page_sets.Top25SmoothPageSet | 186 page_set = page_sets.Top25SmoothPageSet |
| 187 | 187 |
| 188 def SetExtraBrowserOptions(self, options): | 188 def SetExtraBrowserOptions(self, options): |
| 189 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 189 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 190 | 190 |
| 191 @classmethod | 191 @classmethod |
| 192 def Name(cls): | 192 def Name(cls): |
| 193 return 'smoothness.gpu_rasterization.top_25_smooth' | 193 return 'smoothness.gpu_rasterization.top_25_smooth' |
| 194 | 194 |
| 195 @classmethod | 195 @classmethod |
| 196 def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 | 196 def ShouldDisable(cls, possible_browser): # http://crbug.com/597656 |
| 197 return (possible_browser.browser_type == 'reference' and | 197 return (possible_browser.browser_type == 'reference' and |
| 198 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 198 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| 199 | 199 |
| 200 | 200 |
| 201 # Although GPU rasterization is enabled on Mac, it is blacklisted for certain | |
| 202 # path cases, so it is still valuable to run both the GPU and non-GPU versions | |
| 203 # of this benchmark on Mac. | |
| 201 class SmoothnessGpuRasterizationToughPathRenderingCases(_Smoothness): | 204 class SmoothnessGpuRasterizationToughPathRenderingCases(_Smoothness): |
| 202 """Tests a selection of pages with SVG and 2D canvas paths with GPU | 205 """Tests a selection of pages with SVG and 2D canvas paths with GPU |
| 203 rasterization. | 206 rasterization. |
| 204 """ | 207 """ |
| 205 tag = 'gpu_rasterization' | 208 tag = 'gpu_rasterization' |
| 206 page_set = page_sets.ToughPathRenderingCasesPageSet | 209 page_set = page_sets.ToughPathRenderingCasesPageSet |
| 207 | 210 |
| 208 def SetExtraBrowserOptions(self, options): | 211 def SetExtraBrowserOptions(self, options): |
| 209 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 212 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 210 | 213 |
| 211 @classmethod | 214 @classmethod |
| 212 def Name(cls): | 215 def Name(cls): |
| 213 return 'smoothness.gpu_rasterization.tough_path_rendering_cases' | 216 return 'smoothness.gpu_rasterization.tough_path_rendering_cases' |
| 214 | 217 |
| 215 | 218 |
| 219 # With GPU Raster enabled on Mac, there's no reason to run this benchmark in | |
| 220 # addition to SmoothnessFiltersCases. | |
| 221 @benchmark.Disabled('mac') | |
| 216 class SmoothnessGpuRasterizationFiltersCases(_Smoothness): | 222 class SmoothnessGpuRasterizationFiltersCases(_Smoothness): |
| 217 """Tests a selection of pages with SVG and CSS filter effects with GPU | 223 """Tests a selection of pages with SVG and CSS filter effects with GPU |
| 218 rasterization. | 224 rasterization. |
| 219 """ | 225 """ |
| 220 tag = 'gpu_rasterization' | 226 tag = 'gpu_rasterization' |
| 221 page_set = page_sets.ToughFiltersCasesPageSet | 227 page_set = page_sets.ToughFiltersCasesPageSet |
| 222 | 228 |
| 223 def SetExtraBrowserOptions(self, options): | 229 def SetExtraBrowserOptions(self, options): |
| 224 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 230 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 225 | 231 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 | 292 |
| 287 @classmethod | 293 @classmethod |
| 288 def Name(cls): | 294 def Name(cls): |
| 289 return 'smoothness.tough_pinch_zoom_cases' | 295 return 'smoothness.tough_pinch_zoom_cases' |
| 290 | 296 |
| 291 @classmethod | 297 @classmethod |
| 292 def ShouldDisable(cls, possible_browser): | 298 def ShouldDisable(cls, possible_browser): |
| 293 return cls.IsSvelte(possible_browser) # http://crbug.com/564008 | 299 return cls.IsSvelte(possible_browser) # http://crbug.com/564008 |
| 294 | 300 |
| 295 | 301 |
| 296 @benchmark.Enabled('chromeos', 'mac') | 302 @benchmark.Enabled('mac') |
| 297 class SmoothnessDesktopToughPinchZoomCases(_Smoothness): | 303 class SmoothnessDesktopToughPinchZoomCases(_Smoothness): |
| 298 """Measures rendering statistics for pinch-zooming in the tough pinch zoom | 304 """Measures rendering statistics for pinch-zooming in the tough pinch zoom |
| 299 cases. Uses lower zoom levels customized for desktop limits. | 305 cases. Uses lower zoom levels customized for desktop limits. |
| 300 """ | 306 """ |
| 301 page_set = page_sets.DesktopToughPinchZoomCasesPageSet | 307 page_set = page_sets.DesktopToughPinchZoomCasesPageSet |
| 302 | 308 |
| 303 @classmethod | 309 @classmethod |
| 304 def Name(cls): | 310 def Name(cls): |
| 305 return 'smoothness.desktop_tough_pinch_zoom_cases' | 311 return 'smoothness.desktop_tough_pinch_zoom_cases' |
| 306 | 312 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 322 | 328 |
| 323 @classmethod | 329 @classmethod |
| 324 def Name(cls): | 330 def Name(cls): |
| 325 return 'smoothness.gpu_rasterization.tough_pinch_zoom_cases' | 331 return 'smoothness.gpu_rasterization.tough_pinch_zoom_cases' |
| 326 | 332 |
| 327 @classmethod | 333 @classmethod |
| 328 def ShouldDisable(cls, possible_browser): | 334 def ShouldDisable(cls, possible_browser): |
| 329 return cls.IsSvelte(possible_browser) # http://crbug.com/564008 | 335 return cls.IsSvelte(possible_browser) # http://crbug.com/564008 |
| 330 | 336 |
| 331 | 337 |
| 332 @benchmark.Enabled('chromeos', 'mac') | |
|
ericrk
2016/05/26 18:18:52
This never ran on ChromeOS - adding ChromeOS to th
| |
| 333 class SmoothnessGpuRasterizationDesktopToughPinchZoomCases(_Smoothness): | |
| 334 """Measures rendering statistics for pinch-zooming in the tough pinch zoom | |
| 335 cases with GPU rasterization. Uses lower zoom levels customized for desktop | |
| 336 limits. | |
| 337 """ | |
| 338 tag = 'gpu_rasterization' | |
| 339 test = smoothness.Smoothness | |
| 340 page_set = page_sets.DesktopToughPinchZoomCasesPageSet | |
| 341 | |
| 342 def SetExtraBrowserOptions(self, options): | |
| 343 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
| 344 | |
| 345 @classmethod | |
| 346 def Name(cls): | |
| 347 return 'smoothness.gpu_rasterization.desktop_tough_pinch_zoom_cases' | |
| 348 | |
| 349 | |
| 350 @benchmark.Enabled('android', 'chromeos') | 338 @benchmark.Enabled('android', 'chromeos') |
| 351 class SmoothnessToughScrollingWhileZoomedInCases(_Smoothness): | 339 class SmoothnessToughScrollingWhileZoomedInCases(_Smoothness): |
| 352 """Measures rendering statistics for pinch-zooming then diagonal scrolling""" | 340 """Measures rendering statistics for pinch-zooming then diagonal scrolling""" |
| 353 page_set = page_sets.ToughScrollingWhileZoomedInCasesPageSet | 341 page_set = page_sets.ToughScrollingWhileZoomedInCasesPageSet |
| 354 | 342 |
| 355 @classmethod | 343 @classmethod |
| 356 def Name(cls): | 344 def Name(cls): |
| 357 return 'smoothness.tough_scrolling_while_zoomed_in_cases' | 345 return 'smoothness.tough_scrolling_while_zoomed_in_cases' |
| 358 | 346 |
| 359 | 347 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 # Only keep 'mean_pixels_approximated' and 'mean_pixels_checkerboarded' | 380 # Only keep 'mean_pixels_approximated' and 'mean_pixels_checkerboarded' |
| 393 # metrics. (crbug.com/529331) | 381 # metrics. (crbug.com/529331) |
| 394 return value.name in ('mean_pixels_approximated', | 382 return value.name in ('mean_pixels_approximated', |
| 395 'mean_pixels_checkerboarded') | 383 'mean_pixels_checkerboarded') |
| 396 | 384 |
| 397 @classmethod | 385 @classmethod |
| 398 def Name(cls): | 386 def Name(cls): |
| 399 return 'smoothness.tough_scrolling_cases' | 387 return 'smoothness.tough_scrolling_cases' |
| 400 | 388 |
| 401 | 389 |
| 402 @benchmark.Enabled('android', 'mac') | 390 @benchmark.Enabled('android') |
| 403 class SmoothnessGpuRasterizationToughScrollingCases(_Smoothness): | 391 class SmoothnessGpuRasterizationToughScrollingCases(_Smoothness): |
| 404 tag = 'gpu_rasterization' | 392 tag = 'gpu_rasterization' |
| 405 test = smoothness.Smoothness | 393 test = smoothness.Smoothness |
| 406 page_set = page_sets.ToughScrollingCasesPageSet | 394 page_set = page_sets.ToughScrollingCasesPageSet |
| 407 | 395 |
| 408 def SetExtraBrowserOptions(self, options): | 396 def SetExtraBrowserOptions(self, options): |
| 409 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 397 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 410 | 398 |
| 411 @classmethod | 399 @classmethod |
| 412 def Name(cls): | 400 def Name(cls): |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 533 """Measures rendering statistics while scrolling advertisements.""" | 521 """Measures rendering statistics while scrolling advertisements.""" |
| 534 page_set = page_sets.SyntheticToughWebglAdCasesPageSet | 522 page_set = page_sets.SyntheticToughWebglAdCasesPageSet |
| 535 | 523 |
| 536 @classmethod | 524 @classmethod |
| 537 def Name(cls): | 525 def Name(cls): |
| 538 return 'smoothness.tough_webgl_ad_cases' | 526 return 'smoothness.tough_webgl_ad_cases' |
| 539 | 527 |
| 540 @classmethod | 528 @classmethod |
| 541 def ShouldDisable(cls, possible_browser): | 529 def ShouldDisable(cls, possible_browser): |
| 542 return cls.IsSvelte(possible_browser) # http://crbug.com/574485 | 530 return cls.IsSvelte(possible_browser) # http://crbug.com/574485 |
| OLD | NEW |