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

Unified 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: Updated comments, ensure lack of thread_duration becomes 0 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/metrics/gpu_timeline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..46d0db1fac703264e7c917d0e98c5db5badc3627
--- /dev/null
+++ b/tools/perf/benchmarks/gpu_times.py
@@ -0,0 +1,37 @@
+# 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 _GetGPUTimelineMetric(_):
+ return [gpu_timeline.GPUTimelineMetric()]
+
+
+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_metrics_from_flags_callback=_GetGPUTimelineMetric)
+
+
+@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
« no previous file with comments | « no previous file | tools/perf/metrics/gpu_timeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698