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

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

Issue 1914233003: [tools/perf] Delete unused variable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/jetstream.py ('k') | tools/perf/benchmarks/oortonline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from core import perf_benchmark 5 from core import perf_benchmark
6 6
7 from telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry.page import page_test 8 from telemetry.page import page_test
9 from telemetry.value import list_of_scalar_values 9 from telemetry.value import list_of_scalar_values
10 from telemetry.value import scalar 10 from telemetry.value import scalar
11 11
12 from measurements import media 12 from measurements import media
13 import page_sets 13 import page_sets
14 14
15 15
16 class _MSEMeasurement(page_test.PageTest): 16 class _MSEMeasurement(page_test.PageTest):
17 17
18 def __init__(self): 18 def __init__(self):
19 super(_MSEMeasurement, self).__init__() 19 super(_MSEMeasurement, self).__init__()
20 20
21 def ValidateAndMeasurePage(self, page, tab, results): 21 def ValidateAndMeasurePage(self, page, tab, results):
22 del page # unused
22 media_metric = tab.EvaluateJavaScript('window.__testMetrics') 23 media_metric = tab.EvaluateJavaScript('window.__testMetrics')
23 trace = media_metric['id'] if 'id' in media_metric else None 24 trace = media_metric['id'] if 'id' in media_metric else None
24 metrics = media_metric['metrics'] if 'metrics' in media_metric else [] 25 metrics = media_metric['metrics'] if 'metrics' in media_metric else []
25 for m in metrics: 26 for m in metrics:
26 trace_name = '%s.%s' % (m, trace) 27 trace_name = '%s.%s' % (m, trace)
27 if isinstance(metrics[m], list): 28 if isinstance(metrics[m], list):
28 results.AddValue(list_of_scalar_values.ListOfScalarValues( 29 results.AddValue(list_of_scalar_values.ListOfScalarValues(
29 results.current_page, trace_name, units='ms', 30 results.current_page, trace_name, units='ms',
30 values=[float(v) for v in metrics[m]], 31 values=[float(v) for v in metrics[m]],
31 important=True)) 32 important=True))
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 135
135 @classmethod 136 @classmethod
136 def Name(cls): 137 def Name(cls):
137 return 'media.mse_cases' 138 return 'media.mse_cases'
138 139
139 def SetExtraBrowserOptions(self, options): 140 def SetExtraBrowserOptions(self, options):
140 # Needed to allow XHR requests to return stream objects. 141 # Needed to allow XHR requests to return stream objects.
141 options.AppendExtraBrowserArgs( 142 options.AppendExtraBrowserArgs(
142 ['--enable-experimental-web-platform-features', 143 ['--enable-experimental-web-platform-features',
143 '--disable-gesture-requirement-for-media-playback']) 144 '--disable-gesture-requirement-for-media-playback'])
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/jetstream.py ('k') | tools/perf/benchmarks/oortonline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698