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 from metrics import gpu_timeline | |
5 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 | |
10 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' | |
11 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', | |
12 'disabled-by-default-gpu.service'] | |
13 | |
14 def _CreateGPUTimelineMetric(_): | |
15 return gpu_timeline.GPUTimelineMetric() | |
nednguyen
2015/01/23 23:58:13
This mean your benchmark will compute gpu_timeline
David Yen
2015/01/24 00:22:33
Done. I moved the creation to CreateTimelineBasedM
nednguyen
2015/01/24 16:43:04
Sorry, by "compute gpu_timeline on all the intera
David Yen
2015/01/26 19:21:27
No filtering sounds like what we want. I will move
| |
16 | |
17 | |
18 class _GPUTimes(benchmark.Benchmark): | |
19 def CreateTimelineBasedMeasurementOptions(self): | |
20 cat_string = ','.join(TOPLEVEL_CATEGORIES) | |
21 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) | |
22 return timeline_based_measurement.Options( | |
23 overhead_level=cat_filter, | |
24 get_metric_from_metric_type_callback=_CreateGPUTimelineMetric) | |
25 | |
26 | |
27 @benchmark.Enabled('android') | |
28 class GPUTimesKeyMobileSites(_GPUTimes): | |
29 """Measures GPU timeline metric on key mobile sites.""" | |
30 page_set = page_sets.KeyMobileSitesSmoothPageSet | |
31 | |
32 | |
33 class GPUTimesTop25Sites(_GPUTimes): | |
34 """Measures GPU timeline metric for the top 25 sites.""" | |
35 page_set = page_sets.Top25SmoothPageSet | |
OLD | NEW |