Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: tools/perf/benchmarks/gpu_times.py

Issue 854833003: Added GPU performance metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Get Metrics callback now returns a list of metrics Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/metrics/gpu_timeline.py » ('j') | tools/perf/metrics/gpu_timeline.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 class _GPUTimes(benchmark.Benchmark):
15 def CreateTimelineBasedMeasurementOptions(self):
16 cat_string = ','.join(TOPLEVEL_CATEGORIES)
17 cat_filter = tracing_category_filter.TracingCategoryFilter(cat_string)
18
19 gpu_timeline_metric = gpu_timeline.GPUTimelineMetric()
20 def _GetGPUTimelineMetric(_):
21 return [gpu_timeline_metric]
22
23 return timeline_based_measurement.Options(
24 overhead_level=cat_filter,
25 get_metrics_from_metric_type_callback=_GetGPUTimelineMetric)
26
27
28 @benchmark.Enabled('android')
29 class GPUTimesKeyMobileSites(_GPUTimes):
30 """Measures GPU timeline metric on key mobile sites."""
31 page_set = page_sets.KeyMobileSitesSmoothPageSet
32
33
34 class GPUTimesTop25Sites(_GPUTimes):
35 """Measures GPU timeline metric for the top 25 sites."""
36 page_set = page_sets.Top25SmoothPageSet
OLDNEW
« no previous file with comments | « no previous file | tools/perf/metrics/gpu_timeline.py » ('j') | tools/perf/metrics/gpu_timeline.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698