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

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

Issue 2743773002: Port part of media.tough_video_cases to TBMv2 (Closed)
Patch Set: Created 3 years, 9 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 | « testing/buildbot/chromium.perf.fyi.json ('k') | no next file » | 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 legacy_page_test 8 from telemetry.page import legacy_page_test
9 from telemetry.timeline import chrome_trace_category_filter
9 from telemetry.value import list_of_scalar_values 10 from telemetry.value import list_of_scalar_values
10 from telemetry.value import scalar 11 from telemetry.value import scalar
12 from telemetry.web_perf import timeline_based_measurement
11 13
12 from measurements import media 14 from measurements import media
13 import page_sets 15 import page_sets
14 16
15 17
16 class _MSEMeasurement(legacy_page_test.LegacyPageTest): 18 class _MSEMeasurement(legacy_page_test.LegacyPageTest):
17 19
18 def __init__(self): 20 def __init__(self):
19 super(_MSEMeasurement, self).__init__() 21 super(_MSEMeasurement, self).__init__()
20 22
(...skipping 22 matching lines...) Expand all
43 class Media(perf_benchmark.PerfBenchmark): 45 class Media(perf_benchmark.PerfBenchmark):
44 """Obtains media metrics for key user scenarios.""" 46 """Obtains media metrics for key user scenarios."""
45 test = media.Media 47 test = media.Media
46 page_set = page_sets.ToughVideoCasesPageSet 48 page_set = page_sets.ToughVideoCasesPageSet
47 49
48 @classmethod 50 @classmethod
49 def Name(cls): 51 def Name(cls):
50 return 'media.tough_video_cases' 52 return 'media.tough_video_cases'
51 53
52 54
55 class Media2(perf_benchmark.PerfBenchmark):
CalebRouleau 2017/03/09 21:58:39 How about Media_TBMv2 similar to my comment below?
56 """Obtains media metrics using TBMv2. Will eventually replace Media class."""
57 page_set = page_sets.ToughVideoCasesPageSet
58
59 def CreateTimelineBasedMeasurementOptions(self):
60 categories = [
61 # For cpuTimeMetric:
62 'toplevel',
63 ]
64 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
65 ','.join(['-*'] + categories))
66 options = timeline_based_measurement.Options(category_filter)
67 options.SetTimelineBasedMetrics( ['cpuTimeMetric'])
CalebRouleau 2017/03/09 22:00:22 Remove extra space
68 return options
69
70 @classmethod
71 def Name(cls):
72 return 'media.tough_video_cases2'
CalebRouleau 2017/03/09 21:58:39 I think it is worth naming this 'media.tough_vid
73
74
53 # crbug.com/565180: Only include cases that don't report time_to_play 75 # crbug.com/565180: Only include cases that don't report time_to_play
54 @benchmark.Disabled('android') 76 @benchmark.Disabled('android')
55 class MediaExtra(perf_benchmark.PerfBenchmark): 77 class MediaExtra(perf_benchmark.PerfBenchmark):
56 """Obtains extra media metrics for key user scenarios.""" 78 """Obtains extra media metrics for key user scenarios."""
57 test = media.Media 79 test = media.Media
58 page_set = page_sets.ToughVideoCasesExtraPageSet 80 page_set = page_sets.ToughVideoCasesExtraPageSet
59 81
60 @classmethod 82 @classmethod
61 def Name(cls): 83 def Name(cls):
62 return 'media.tough_video_cases_extra' 84 return 'media.tough_video_cases_extra'
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 159
138 @classmethod 160 @classmethod
139 def Name(cls): 161 def Name(cls):
140 return 'media.mse_cases' 162 return 'media.mse_cases'
141 163
142 def SetExtraBrowserOptions(self, options): 164 def SetExtraBrowserOptions(self, options):
143 # Needed to allow XHR requests to return stream objects. 165 # Needed to allow XHR requests to return stream objects.
144 options.AppendExtraBrowserArgs( 166 options.AppendExtraBrowserArgs(
145 ['--enable-experimental-web-platform-features', 167 ['--enable-experimental-web-platform-features',
146 '--disable-gesture-requirement-for-media-playback']) 168 '--disable-gesture-requirement-for-media-playback'])
OLDNEW
« no previous file with comments | « testing/buildbot/chromium.perf.fyi.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698