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 from telemetry import benchmark |
| 5 from telemetry.core.platform import tracing_category_filter |
| 6 from telemetry.web_perf.metrics import gpu_timeline |
| 7 from telemetry.web_perf import timeline_based_measurement |
| 8 |
4 from benchmarks import silk_flags | 9 from benchmarks import silk_flags |
5 import page_sets | 10 import page_sets |
6 from telemetry import benchmark | |
7 from telemetry.core.platform import tracing_category_filter | |
8 from telemetry.web_perf import timeline_based_measurement | |
9 from telemetry.web_perf.metrics import gpu_timeline | |
10 | 11 |
11 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' | 12 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' |
12 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', | 13 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', |
13 'disabled-by-default-gpu.service'] | 14 'disabled-by-default-gpu.service'] |
14 | 15 |
15 | 16 |
16 class _GPUTimes(benchmark.Benchmark): | 17 class _GPUTimes(benchmark.Benchmark): |
17 def CreateTimelineBasedMeasurementOptions(self): | 18 def CreateTimelineBasedMeasurementOptions(self): |
18 cat_string = ','.join(TOPLEVEL_CATEGORIES) | 19 cat_string = ','.join(TOPLEVEL_CATEGORIES) |
19 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) | 20 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. | 62 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. |
62 """ | 63 """ |
63 page_set = page_sets.Top25SmoothPageSet | 64 page_set = page_sets.Top25SmoothPageSet |
64 def CustomizeBrowserOptions(self, options): | 65 def CustomizeBrowserOptions(self, options): |
65 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 66 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
66 | 67 |
67 @classmethod | 68 @classmethod |
68 def Name(cls): | 69 def Name(cls): |
69 return 'gpu_times.gpu_rasterization.top_25_smooth' | 70 return 'gpu_times.gpu_rasterization.top_25_smooth' |
70 | 71 |
OLD | NEW |