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

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

Issue 2775883003: Port TBMv2-based media benchmark to Android (Closed)
Patch Set: Tag smpte_3840x2160_60fps_vp9.webm with is_4k Created 3 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/benchmark.csv ('k') | tools/perf/page_sets/tough_video_cases.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 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*).
117 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} 119 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
118 120
119 @classmethod 121 @classmethod
120 def ShouldDisable(cls, possible_browser): 122 def ShouldDisable(cls, possible_browser):
121 if possible_browser.platform.GetOSName() != "android": 123 if possible_browser.platform.GetOSName() != "android":
122 return True 124 return True
123 return cls.IsSvelte(possible_browser) 125 return cls.IsSvelte(possible_browser)
124 126
125 @classmethod 127 @classmethod
126 def Name(cls): 128 def Name(cls):
127 return 'media.android.tough_video_cases' 129 return 'media.android.tough_video_cases'
128 130
129 131
132 @benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'],
133 component='Internals>Media')
134 @benchmark.Enabled('android')
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 options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
142
143 @classmethod
144 def ShouldDisable(cls, possible_browser):
145 return cls.IsSvelte(possible_browser)
146
147 @classmethod
148 def Name(cls):
149 return 'media.android.tough_video_cases_tbmv2'
150
151 def SetExtraBrowserOptions(self, options):
152 # By default, Chrome on Android does not allow autoplay
153 # of media: it requires a user gesture event to start a video.
154 # The following option works around that.
155 options.AppendExtraBrowserArgs(
156 ['--disable-gesture-requirement-for-media-playback'])
157
158
130 @benchmark.Enabled('chromeos') 159 @benchmark.Enabled('chromeos')
131 class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark): 160 class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark):
132 """Benchmark for media performance on ChromeOS using only is_4k test content. 161 """Benchmark for media performance on ChromeOS using only is_4k test content.
133 """ 162 """
134 test = media.Media 163 test = media.Media
135 tag = 'chromeOS4kOnly' 164 tag = 'chromeOS4kOnly'
136 page_set = page_sets.ToughVideoCasesPageSet 165 page_set = page_sets.ToughVideoCasesPageSet
137 options = { 166 options = {
138 'story_tag_filter': 'is_4k', 167 'story_tag_filter': 'is_4k',
139 # Exclude is_50fps test files: crbug/331816 168 # Exclude is_50fps test files: crbug/331816
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 201
173 @classmethod 202 @classmethod
174 def Name(cls): 203 def Name(cls):
175 return 'media.mse_cases' 204 return 'media.mse_cases'
176 205
177 def SetExtraBrowserOptions(self, options): 206 def SetExtraBrowserOptions(self, options):
178 # Needed to allow XHR requests to return stream objects. 207 # Needed to allow XHR requests to return stream objects.
179 options.AppendExtraBrowserArgs( 208 options.AppendExtraBrowserArgs(
180 ['--enable-experimental-web-platform-features', 209 ['--enable-experimental-web-platform-features',
181 '--disable-gesture-requirement-for-media-playback']) 210 '--disable-gesture-requirement-for-media-playback'])
OLDNEW
« no previous file with comments | « tools/perf/benchmark.csv ('k') | tools/perf/page_sets/tough_video_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698