| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 | 6 |
| 7 from benchmarks import silk_flags | 7 from benchmarks import silk_flags |
| 8 | 8 |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.timeline import tracing_category_filter | 10 from telemetry.timeline import tracing_category_filter |
| 11 from telemetry.web_perf.metrics import gpu_timeline | 11 from telemetry.web_perf.metrics import gpu_timeline |
| 12 from telemetry.web_perf import timeline_based_measurement | 12 from telemetry.web_perf import timeline_based_measurement |
| 13 | 13 |
| 14 import page_sets | 14 import page_sets |
| 15 | 15 |
| 16 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', | 16 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', |
| 17 'disabled-by-default-gpu.service'] | 17 'disabled-by-default-gpu.service'] |
| 18 | 18 |
| 19 | 19 |
| 20 class _GPUTimes(perf_benchmark.PerfBenchmark): | 20 class _GPUTimes(perf_benchmark.PerfBenchmark): |
| 21 def CreateTimelineBasedMeasurementOptions(self): | 21 def CreateTimelineBasedMeasurementOptions(self): |
| 22 cat_string = ','.join(TOPLEVEL_CATEGORIES) | 22 cat_string = ','.join(TOPLEVEL_CATEGORIES) |
| 23 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) | 23 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) |
| 24 | 24 |
| 25 options = timeline_based_measurement.Options(overhead_level=cat_filter) | 25 options = timeline_based_measurement.Options(overhead_level=cat_filter) |
| 26 options.SetTimelineBasedMetrics([gpu_timeline.GPUTimelineMetric()]) | 26 options.SetTimelineBasedMetrics([gpu_timeline.GPUTimelineMetric()]) |
| 27 return options | 27 return options |
| 28 | 28 |
| 29 @benchmark.Disabled # http://crbug.com/453131, http://crbug.com/527543 | 29 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/527543 |
| 30 class GPUTimesKeyMobileSites(_GPUTimes): | 30 class GPUTimesKeyMobileSites(_GPUTimes): |
| 31 """Measures GPU timeline metric on key mobile sites.""" | 31 """Measures GPU timeline metric on key mobile sites.""" |
| 32 page_set = page_sets.KeyMobileSitesSmoothPageSet | 32 page_set = page_sets.KeyMobileSitesSmoothPageSet |
| 33 | 33 |
| 34 @classmethod | 34 @classmethod |
| 35 def Name(cls): | 35 def Name(cls): |
| 36 return 'gpu_times.key_mobile_sites_smooth' | 36 return 'gpu_times.key_mobile_sites_smooth' |
| 37 | 37 |
| 38 @benchmark.Disabled # http://crbug.com/453131, http://crbug.com/527543 | 38 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/527543 |
| 39 class GPUTimesGpuRasterizationKeyMobileSites(_GPUTimes): | 39 class GPUTimesGpuRasterizationKeyMobileSites(_GPUTimes): |
| 40 """Measures GPU timeline metric on key mobile sites with GPU rasterization. | 40 """Measures GPU timeline metric on key mobile sites with GPU rasterization. |
| 41 """ | 41 """ |
| 42 page_set = page_sets.KeyMobileSitesSmoothPageSet | 42 page_set = page_sets.KeyMobileSitesSmoothPageSet |
| 43 def SetExtraBrowserOptions(self, options): | 43 def SetExtraBrowserOptions(self, options): |
| 44 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 44 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 45 | 45 |
| 46 @classmethod | 46 @classmethod |
| 47 def Name(cls): | 47 def Name(cls): |
| 48 return 'gpu_times.gpu_rasterization.key_mobile_sites_smooth' | 48 return 'gpu_times.gpu_rasterization.key_mobile_sites_smooth' |
| 49 | 49 |
| 50 @benchmark.Disabled # http://crbug.com/453131, http://crbug.com/517476 | 50 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/517476 |
| 51 class GPUTimesTop25Sites(_GPUTimes): | 51 class GPUTimesTop25Sites(_GPUTimes): |
| 52 """Measures GPU timeline metric for the top 25 sites.""" | 52 """Measures GPU timeline metric for the top 25 sites.""" |
| 53 page_set = page_sets.Top25SmoothPageSet | 53 page_set = page_sets.Top25SmoothPageSet |
| 54 | 54 |
| 55 @classmethod | 55 @classmethod |
| 56 def Name(cls): | 56 def Name(cls): |
| 57 return 'gpu_times.top_25_smooth' | 57 return 'gpu_times.top_25_smooth' |
| 58 | 58 |
| 59 @benchmark.Disabled # http://crbug.com/453131, http://crbug.com/517476 | 59 @benchmark.Disabled('all') # http://crbug.com/453131, http://crbug.com/517476 |
| 60 class GPUTimesGpuRasterizationTop25Sites(_GPUTimes): | 60 class GPUTimesGpuRasterizationTop25Sites(_GPUTimes): |
| 61 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. | 61 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. |
| 62 """ | 62 """ |
| 63 page_set = page_sets.Top25SmoothPageSet | 63 page_set = page_sets.Top25SmoothPageSet |
| 64 def SetExtraBrowserOptions(self, options): | 64 def SetExtraBrowserOptions(self, options): |
| 65 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 65 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| 66 | 66 |
| 67 @classmethod | 67 @classmethod |
| 68 def Name(cls): | 68 def Name(cls): |
| 69 return 'gpu_times.gpu_rasterization.top_25_smooth' | 69 return 'gpu_times.gpu_rasterization.top_25_smooth' |
| OLD | NEW |