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

Unified 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, 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/media.py
diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py
index 984b530e39bacdab151d0a502fbc8a62adf64f3f..557d0796dcb392c380f796115e318214c58c4abd 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,12 +111,11 @@ 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'
page_set = page_sets.ToughVideoCasesPageSet
- # Exclude is_4k and 50 fps media files (garden* & crowd*).
options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
@classmethod
@@ -127,6 +129,33 @@ class MediaAndroid(perf_benchmark.PerfBenchmark):
return 'media.android.tough_video_cases'
+@benchmark.Owner(emails=['johnchen@chromium.org', 'crouleau@chromium.org'],
+ component='Internals>Media')
+@benchmark.Enabled('android')
+@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'
+ options = {'story_tag_filter_exclude': 'is_4k,is_50fps'}
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ 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 does not allow autoplay
+ # of media: it requires a user gesture event to start a video.
+ # 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.
« 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