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

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

Issue 2775883003: Port TBMv2-based media benchmark to Android (Closed)
Patch Set: Port TBMv2-based media benchmark to Android 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 | « tools/perf/benchmark.csv ('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.timeline import chrome_trace_category_filter
10 from telemetry.value import list_of_scalar_values 10 from telemetry.value import list_of_scalar_values
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class MediaToughVideoCases(perf_benchmark.PerfBenchmark): 45 class MediaToughVideoCases(perf_benchmark.PerfBenchmark):
46 """Obtains media metrics for key user scenarios.""" 46 """Obtains media metrics for key user scenarios."""
47 test = media.Media 47 test = media.Media
48 page_set = page_sets.ToughVideoCasesPageSet 48 page_set = page_sets.ToughVideoCasesPageSet
49 49
50 @classmethod 50 @classmethod
51 def Name(cls): 51 def Name(cls):
52 return 'media.tough_video_cases' 52 return 'media.tough_video_cases'
53 53
54 54
55 @benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], 55 class _MediaTBMv2Benchmark(perf_benchmark.PerfBenchmark):
56 component='Internals>Media')
57 @benchmark.Disabled('android')
58 class MediaToughVideoCasesTBMv2(perf_benchmark.PerfBenchmark):
59 """Obtains media metrics using TBMv2.
60 Will eventually replace MediaToughVideoCases class."""
61 page_set = page_sets.ToughVideoCasesPageSet 56 page_set = page_sets.ToughVideoCasesPageSet
62 57
63 def CreateTimelineBasedMeasurementOptions(self): 58 def CreateTimelineBasedMeasurementOptions(self):
64 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter() 59 category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
65 60
66 # 'toplevel' category provides CPU time slices used by # cpuTimeMetric. 61 # 'toplevel' category provides CPU time slices used by # cpuTimeMetric.
67 category_filter.AddIncludedCategory('toplevel') 62 category_filter.AddIncludedCategory('toplevel')
68 63
69 # 'rail' category is used by powerMetric to attribute different period of 64 # 'rail' category is used by powerMetric to attribute different period of
70 # time to different activities, such as video_animation, etc. 65 # time to different activities, such as video_animation, etc.
71 category_filter.AddIncludedCategory('rail') 66 category_filter.AddIncludedCategory('rail')
72 67
73 options = timeline_based_measurement.Options(category_filter) 68 options = timeline_based_measurement.Options(category_filter)
74 options.config.enable_atrace_trace = True 69 options.config.enable_atrace_trace = True
75 options.config.atrace_config.categories = ['sched'] 70 options.config.atrace_config.categories = ['sched']
76 options.config.enable_battor_trace = True 71 options.config.enable_battor_trace = True
77 options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric']) 72 options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric'])
78 return options 73 return options
79 74
75
76 @benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'],
77 component='Internals>Media')
78 @benchmark.Disabled('android')
79 class MediaToughVideoCasesTBMv2(_MediaTBMv2Benchmark):
80 """Obtains media metrics using TBMv2.
81 Will eventually replace MediaToughVideoCases class."""
82
80 @classmethod 83 @classmethod
81 def Name(cls): 84 def Name(cls):
82 return 'media.tough_video_cases_tbmv2' 85 return 'media.tough_video_cases_tbmv2'
83 86
84 87
85 # crbug.com/565180: Only include cases that don't report time_to_play 88 # crbug.com/565180: Only include cases that don't report time_to_play
86 @benchmark.Disabled('android') 89 @benchmark.Disabled('android')
87 @benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com']) 90 @benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com'])
88 class MediaExtra(perf_benchmark.PerfBenchmark): 91 class MediaExtra(perf_benchmark.PerfBenchmark):
89 """Obtains extra media metrics for key user scenarios.""" 92 """Obtains extra media metrics for key user scenarios."""
(...skipping 11 matching lines...) Expand all
101 """Obtains media metrics under different network simulations.""" 104 """Obtains media metrics under different network simulations."""
102 test = media.Media 105 test = media.Media
103 page_set = page_sets.MediaCnsCasesPageSet 106 page_set = page_sets.MediaCnsCasesPageSet
104 107
105 @classmethod 108 @classmethod
106 def Name(cls): 109 def Name(cls):
107 return 'media.media_cns_cases' 110 return 'media.media_cns_cases'
108 111
109 112
110 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. 113 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689.
111 class MediaAndroid(perf_benchmark.PerfBenchmark): 114 class MediaAndroidToughVideoCases(perf_benchmark.PerfBenchmark):
112 """Obtains media metrics for key user scenarios on Android.""" 115 """Obtains media metrics for key user scenarios on Android."""
113 test = media.Media 116 test = media.Media
114 tag = 'android' 117 tag = 'android'
115 page_set = page_sets.ToughVideoCasesPageSet 118 page_set = page_sets.ToughVideoCasesPageSet
116 # Exclude is_4k and 50 fps media files (garden* & crowd*). 119 # Exclude is_4k and 50 fps media files (garden* & crowd*).
117 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} 120 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
118 121
119 @classmethod 122 @classmethod
120 def ShouldDisable(cls, possible_browser): 123 def ShouldDisable(cls, possible_browser):
121 if possible_browser.platform.GetOSName() != "android": 124 if possible_browser.platform.GetOSName() != "android":
122 return True 125 return True
123 return cls.IsSvelte(possible_browser) 126 return cls.IsSvelte(possible_browser)
124 127
125 @classmethod 128 @classmethod
126 def Name(cls): 129 def Name(cls):
127 return 'media.android.tough_video_cases' 130 return 'media.android.tough_video_cases'
128 131
129 132
133 @benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'],
134 component='Internals>Media')
135 @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689.
136 class MediaAndroidToughVideoCasesTBMv2(_MediaTBMv2Benchmark):
137 """Obtains media metrics for key user scenarios on Android using TBMv2.
138 Will eventually replace MediaAndroidToughVideoCases class."""
139
140 tag = 'android'
141 # Exclude is_4k and 50 fps media files (garden* & crowd*).
charliea (OOO until 10-5) 2017/03/27 17:16:22 nit: I'm not sure how useful this comment is. The
142 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
143
144 @classmethod
145 def ShouldDisable(cls, possible_browser):
146 if possible_browser.platform.GetOSName() != "android":
charliea (OOO until 10-5) 2017/03/27 17:16:22 You can get rid of this lineby putting: @benchmar
147 return True
148 return cls.IsSvelte(possible_browser)
149
150 @classmethod
151 def Name(cls):
152 return 'media.android.tough_video_cases_tbmv2'
153
154 def SetExtraBrowserOptions(self, options):
155 # By default, Chrome on Android disallows auto play of media.
CalebRouleau 2017/03/27 16:24:45 To make this more clear: "By default, Chrome on A
156 # The following option works around that.
157 options.AppendExtraBrowserArgs(
158 ['--disable-gesture-requirement-for-media-playback'])
159
160
130 @benchmark.Enabled('chromeos') 161 @benchmark.Enabled('chromeos')
131 class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark): 162 class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark):
132 """Benchmark for media performance on ChromeOS using only is_4k test content. 163 """Benchmark for media performance on ChromeOS using only is_4k test content.
133 """ 164 """
134 test = media.Media 165 test = media.Media
135 tag = 'chromeOS4kOnly' 166 tag = 'chromeOS4kOnly'
136 page_set = page_sets.ToughVideoCasesPageSet 167 page_set = page_sets.ToughVideoCasesPageSet
137 options = { 168 options = {
138 'story_tag_filter': 'is_4k', 169 'story_tag_filter': 'is_4k',
139 # Exclude is_50fps test files: crbug/331816 170 # Exclude is_50fps test files: crbug/331816
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 203
173 @classmethod 204 @classmethod
174 def Name(cls): 205 def Name(cls):
175 return 'media.mse_cases' 206 return 'media.mse_cases'
176 207
177 def SetExtraBrowserOptions(self, options): 208 def SetExtraBrowserOptions(self, options):
178 # Needed to allow XHR requests to return stream objects. 209 # Needed to allow XHR requests to return stream objects.
179 options.AppendExtraBrowserArgs( 210 options.AppendExtraBrowserArgs(
180 ['--enable-experimental-web-platform-features', 211 ['--enable-experimental-web-platform-features',
181 '--disable-gesture-requirement-for-media-playback']) 212 '--disable-gesture-requirement-for-media-playback'])
OLDNEW
« no previous file with comments | « tools/perf/benchmark.csv ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698