Chromium Code Reviews| Index: tools/perf/benchmarks/gpu_times.py |
| diff --git a/tools/perf/benchmarks/gpu_times.py b/tools/perf/benchmarks/gpu_times.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..488b31f869e745ce9c0830a3f85ae7d66682b215 |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/gpu_times.py |
| @@ -0,0 +1,35 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from metrics import gpu_timeline |
| +import page_sets |
| +from telemetry import benchmark |
| +from telemetry.core.platform import tracing_category_filter |
| +from telemetry.web_perf import timeline_based_measurement |
| + |
| +TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' |
| +TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device', |
| + 'disabled-by-default-gpu.service'] |
| + |
| +def _CreateGPUTimelineMetric(_): |
| + 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
|
| + |
| + |
| +class _GPUTimes(benchmark.Benchmark): |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + cat_string = ','.join(TOPLEVEL_CATEGORIES) |
| + cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string) |
| + return timeline_based_measurement.Options( |
| + overhead_level=cat_filter, |
| + get_metric_from_metric_type_callback=_CreateGPUTimelineMetric) |
| + |
| + |
| +@benchmark.Enabled('android') |
| +class GPUTimesKeyMobileSites(_GPUTimes): |
| + """Measures GPU timeline metric on key mobile sites.""" |
| + page_set = page_sets.KeyMobileSitesSmoothPageSet |
| + |
| + |
| +class GPUTimesTop25Sites(_GPUTimes): |
| + """Measures GPU timeline metric for the top 25 sites.""" |
| + page_set = page_sets.Top25SmoothPageSet |