Chromium Code Reviews| 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 benchmarks import silk_flags | |
| 4 from metrics import gpu_timeline | 5 from metrics import gpu_timeline |
| 5 import page_sets | 6 import page_sets |
| 6 from telemetry import benchmark | 7 from telemetry import benchmark |
| 7 from telemetry.core.platform import tracing_category_filter | 8 from telemetry.core.platform import tracing_category_filter |
| 8 from telemetry.web_perf import timeline_based_measurement | 9 from telemetry.web_perf import timeline_based_measurement |
| 9 | 10 |
| 10 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' | 11 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' |
| 11 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', | 12 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', |
| 12 'disabled-by-default-gpu.service'] | 13 'disabled-by-default-gpu.service'] |
| 13 | 14 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 24 return timeline_based_measurement.Options( | 25 return timeline_based_measurement.Options( |
| 25 overhead_level=cat_filter, | 26 overhead_level=cat_filter, |
| 26 get_metrics_from_flags_callback=_GetGPUTimelineMetric) | 27 get_metrics_from_flags_callback=_GetGPUTimelineMetric) |
| 27 | 28 |
| 28 | 29 |
| 29 @benchmark.Enabled('android') | 30 @benchmark.Enabled('android') |
| 30 class GPUTimesKeyMobileSites(_GPUTimes): | 31 class GPUTimesKeyMobileSites(_GPUTimes): |
| 31 """Measures GPU timeline metric on key mobile sites.""" | 32 """Measures GPU timeline metric on key mobile sites.""" |
| 32 page_set = page_sets.KeyMobileSitesSmoothPageSet | 33 page_set = page_sets.KeyMobileSitesSmoothPageSet |
| 33 | 34 |
| 35 @classmethod | |
| 36 def Name(cls): | |
| 37 return 'gpu_times.key_mobile_sites_smooth' | |
| 38 | |
| 39 @benchmark.Enabled('android') | |
| 40 class GPUTimesGpuRasterizationKeyMobileSites(_GPUTimes): | |
| 41 """Measures GPU timeline metric on key mobile sites.""" | |
|
vmiura
2015/01/29 01:26:55
nit: comment + "with GPU rasterization"
David Yen
2015/01/29 17:17:46
Done.
| |
| 42 page_set = page_sets.KeyMobileSitesSmoothPageSet | |
| 43 def CustomizeBrowserOptions(self, options): | |
| 44 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
| 45 | |
| 46 @classmethod | |
| 47 def Name(cls): | |
| 48 return 'gpu_times.gpu_rasterization.key_mobile_sites_smooth' | |
| 34 | 49 |
| 35 class GPUTimesTop25Sites(_GPUTimes): | 50 class GPUTimesTop25Sites(_GPUTimes): |
| 36 """Measures GPU timeline metric for the top 25 sites.""" | 51 """Measures GPU timeline metric for the top 25 sites.""" |
| 37 page_set = page_sets.Top25SmoothPageSet | 52 page_set = page_sets.Top25SmoothPageSet |
| 53 | |
| 54 @classmethod | |
| 55 def Name(cls): | |
| 56 return 'gpu_times.top_25_smooth' | |
| 57 | |
| 58 class GPUTimesGpuRasterizationTop25Sites(_GPUTimes): | |
| 59 """Measures GPU timeline metric for the top 25 sites with GPU rasterization. | |
| 60 """ | |
| 61 page_set = page_sets.Top25SmoothPageSet | |
| 62 def CustomizeBrowserOptions(self, options): | |
| 63 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | |
| 64 | |
| 65 @classmethod | |
| 66 def Name(cls): | |
| 67 return 'gpu_times.gpu_rasterization.top_25_smooth' | |
| OLD | NEW |