Chromium Code Reviews| Index: tools/perf/benchmarks/media.py |
| diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py |
| index 984b530e39bacdab151d0a502fbc8a62adf64f3f..c8a03a8d9a579f8077d5837e1c569390719b778e 100644 |
| --- a/tools/perf/benchmarks/media.py |
| +++ b/tools/perf/benchmarks/media.py |
| @@ -52,12 +52,7 @@ class MediaToughVideoCases(perf_benchmark.PerfBenchmark): |
| return 'media.tough_video_cases' |
| -@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], |
| - component='Internals>Media') |
| -@benchmark.Disabled('android') |
| -class MediaToughVideoCasesTBMv2(perf_benchmark.PerfBenchmark): |
| - """Obtains media metrics using TBMv2. |
| - Will eventually replace MediaToughVideoCases class.""" |
| +class _MediaTBMv2Benchmark(perf_benchmark.PerfBenchmark): |
| page_set = page_sets.ToughVideoCasesPageSet |
| def CreateTimelineBasedMeasurementOptions(self): |
| @@ -77,6 +72,14 @@ class MediaToughVideoCasesTBMv2(perf_benchmark.PerfBenchmark): |
| options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric']) |
| return options |
| + |
| +@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], |
| + component='Internals>Media') |
| +@benchmark.Disabled('android') |
| +class MediaToughVideoCasesTBMv2(_MediaTBMv2Benchmark): |
| + """Obtains media metrics using TBMv2. |
| + Will eventually replace MediaToughVideoCases class.""" |
| + |
| @classmethod |
| def Name(cls): |
| return 'media.tough_video_cases_tbmv2' |
| @@ -108,7 +111,7 @@ class MediaNetworkSimulation(perf_benchmark.PerfBenchmark): |
| @benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. |
| -class MediaAndroid(perf_benchmark.PerfBenchmark): |
| +class MediaAndroidToughVideoCases(perf_benchmark.PerfBenchmark): |
| """Obtains media metrics for key user scenarios on Android.""" |
| test = media.Media |
| tag = 'android' |
| @@ -127,6 +130,34 @@ class MediaAndroid(perf_benchmark.PerfBenchmark): |
| return 'media.android.tough_video_cases' |
| +@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'], |
| + component='Internals>Media') |
| +@benchmark.Disabled('l', 'android-webview') # WebView: crbug.com/419689. |
| +class MediaAndroidToughVideoCasesTBMv2(_MediaTBMv2Benchmark): |
| + """Obtains media metrics for key user scenarios on Android using TBMv2. |
| + Will eventually replace MediaAndroidToughVideoCases class.""" |
| + |
| + tag = 'android' |
| + # 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
|
| + options = {'story_tag_filter_exclude': 'is_4k,is_50fps'} |
| + |
| + @classmethod |
| + def ShouldDisable(cls, possible_browser): |
| + 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
|
| + return True |
| + return cls.IsSvelte(possible_browser) |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'media.android.tough_video_cases_tbmv2' |
| + |
| + def SetExtraBrowserOptions(self, options): |
| + # 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
|
| + # The following option works around that. |
| + options.AppendExtraBrowserArgs( |
| + ['--disable-gesture-requirement-for-media-playback']) |
| + |
| + |
| @benchmark.Enabled('chromeos') |
| class MediaChromeOS4kOnly(perf_benchmark.PerfBenchmark): |
| """Benchmark for media performance on ChromeOS using only is_4k test content. |