| OLD | NEW |
| (Empty) |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from core import perf_benchmark | |
| 6 | |
| 7 from benchmarks import silk_flags | |
| 8 | |
| 9 from telemetry import benchmark | |
| 10 from telemetry.timeline import chrome_trace_category_filter | |
| 11 from telemetry.web_perf.metrics import gpu_timeline | |
| 12 from telemetry.web_perf import timeline_based_measurement | |
| 13 | |
| 14 import page_sets | |
| 15 | |
| 16 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', | |
| 17 'disabled-by-default-gpu.service'] | |
| 18 | |
| 19 | |
| 20 class _GPUTimes(perf_benchmark.PerfBenchmark): | |
| 21 | |
| 22 def CreateTimelineBasedMeasurementOptions(self): | |
| 23 cat_string = ','.join(TOPLEVEL_CATEGORIES) | |
| 24 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter( | |
| 25 cat_string) | |
| 26 | |
| 27 options = timeline_based_measurement.Options(overhead_level=cat_filter) | |
| 28 options.SetLegacyTimelineBasedMetrics([gpu_timeline.GPUTimelineMetric()]) | |
| 29 return options | |
| 30 | |
| 31 | |
| 32 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/527543 | |
| 33 class GPUTimesKeyMobileSites(_GPUTimes): | |
| 34 """Measures GPU timeline metric on key mobile sites.""" | |
| 35 page_set = page_sets.KeyMobileSitesSmoothPageSet | |
| 36 | |
| 37 @classmethod | |
| 38 def Name(cls): | |
| 39 return 'gpu_times.key_mobile_sites_smooth' | |
| 40 | |
| 41 | |
| 42 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/527543 | |
| 43 class GPUTimesGpuRasterizationKeyMobileSites(_GPUTimes): | |
| 44 """Measures GPU timeline metric on key mobile sites with GPU rasterization. | |
| 45 """ | |
| 46 page_set = page_sets.KeyMobileSitesSmoothPageSet | |
| 47 | |
| 48 def SetExtraBrowserOptions(self, options): | |
| 49 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
| 50 | |
| 51 @classmethod | |
| 52 def Name(cls): | |
| 53 return 'gpu_times.gpu_rasterization.key_mobile_sites_smooth' | |
| 54 | |
| 55 | |
| 56 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/517476 | |
| 57 class GPUTimesTop25Sites(_GPUTimes): | |
| 58 """Measures GPU timeline metric for the top 25 sites.""" | |
| 59 page_set = page_sets.Top25SmoothPageSet | |
| 60 | |
| 61 @classmethod | |
| 62 def Name(cls): | |
| 63 return 'gpu_times.top_25_smooth' | |
| 64 | |
| 65 | |
| 66 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/517476 | |
| 67 class GPUTimesGpuRasterizationTop25Sites(_GPUTimes): | |
| 68 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. | |
| 69 """ | |
| 70 page_set = page_sets.Top25SmoothPageSet | |
| 71 | |
| 72 def SetExtraBrowserOptions(self, options): | |
| 73 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
| 74 | |
| 75 @classmethod | |
| 76 def Name(cls): | |
| 77 return 'gpu_times.gpu_rasterization.top_25_smooth' | |
| OLD | NEW |