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

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

Issue 854833003: Added GPU performance metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified gpu_timeline using new SwapBuffer trace 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 | « tools/perf/benchmarks/gpu_times.py ('k') | tools/perf/measurements/gpu_times_unittest.py » ('j') | no next file with comments »
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 measurements import timeline_controller
5 from metrics import gpu_timeline
6 from telemetry.core.platform import tracing_category_filter
7 from telemetry.page import page_test
8 from telemetry.web_perf.metrics import layout
9
10 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel'
11 TOPLEVEL_CATEGORIES = ['disabled-by-default-gpu.device',
12 'disabled-by-default-gpu.service']
13
14
15 class GPUTimes(page_test.PageTest):
nednguyen 2015/01/23 02:45:27 Why not adding this metrics to timeline_based_meas
16 def __init__(self, action_name_to_run='RunPageInteractions'):
17 super(GPUTimes, self).__init__(action_name_to_run=action_name_to_run)
18 self._timeline_controller = None
19
20 def WillNavigateToPage(self, page, tab):
21 self._timeline_controller = timeline_controller.TimelineController()
22 self._timeline_controller.trace_categories = ','.join(TOPLEVEL_CATEGORIES)
23 self._timeline_controller.SetUp(page, tab)
24
25 def WillRunActions(self, page, tab):
26 self._timeline_controller.Start(tab)
27
28 def ValidateAndMeasurePage(self, page, tab, results):
29 self._timeline_controller.Stop(tab, results)
30 metric = gpu_timeline.GPUTimelineMetric()
31 metric.AddResults(self._timeline_controller.model, None,
32 self._timeline_controller.smooth_records, results)
33
34 def CleanUpAfterPage(self, _, tab):
35 self._timeline_controller.CleanUp(tab)
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/gpu_times.py ('k') | tools/perf/measurements/gpu_times_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698