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

Unified Diff: tools/perf/benchmarks/media.py

Issue 2743773002: Port part of media.tough_video_cases to TBMv2 (Closed)
Patch Set: Rebase 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/benchmarks/battor.py ('k') | no next file » | 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 7eb9ae9d924f17103ae439c07e9e146717aea4eb..984b530e39bacdab151d0a502fbc8a62adf64f3f 100644
--- a/tools/perf/benchmarks/media.py
+++ b/tools/perf/benchmarks/media.py
@@ -6,8 +6,10 @@ from core import perf_benchmark
from telemetry import benchmark
from telemetry.page import legacy_page_test
+from telemetry.timeline import chrome_trace_category_filter
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
+from telemetry.web_perf import timeline_based_measurement
from measurements import media
import page_sets
@@ -40,7 +42,7 @@ class _MSEMeasurement(legacy_page_test.LegacyPageTest):
# android: See media.android.tough_video_cases below
# crbug.com/565180: Only include cases that report time_to_play
@benchmark.Disabled('android')
-class Media(perf_benchmark.PerfBenchmark):
+class MediaToughVideoCases(perf_benchmark.PerfBenchmark):
"""Obtains media metrics for key user scenarios."""
test = media.Media
page_set = page_sets.ToughVideoCasesPageSet
@@ -50,6 +52,36 @@ class Media(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."""
+ page_set = page_sets.ToughVideoCasesPageSet
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
+
+ # 'toplevel' category provides CPU time slices used by # cpuTimeMetric.
+ category_filter.AddIncludedCategory('toplevel')
+
+ # 'rail' category is used by powerMetric to attribute different period of
+ # time to different activities, such as video_animation, etc.
+ category_filter.AddIncludedCategory('rail')
+
+ options = timeline_based_measurement.Options(category_filter)
+ options.config.enable_atrace_trace = True
+ options.config.atrace_config.categories = ['sched']
+ options.config.enable_battor_trace = True
+ options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric'])
+ return options
+
+ @classmethod
+ def Name(cls):
+ return 'media.tough_video_cases_tbmv2'
+
+
# crbug.com/565180: Only include cases that don't report time_to_play
@benchmark.Disabled('android')
@benchmark.Owner(emails=['crouleau@chromium.org', 'videostack-eng@google.com'])
« no previous file with comments | « tools/perf/benchmarks/battor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698