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

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

Issue 2743773002: Port part of media.tough_video_cases to TBMv2 (Closed)
Patch Set: 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 | « testing/buildbot/chromium.perf.fyi.json ('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 c5c6ba613934b033b5f76770000c5d16809565bf..6c8c2659e63bd5e7e1730263fddc6e794e3a9670 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
@@ -50,6 +52,26 @@ class Media(perf_benchmark.PerfBenchmark):
return 'media.tough_video_cases'
+class Media2(perf_benchmark.PerfBenchmark):
CalebRouleau 2017/03/09 21:58:39 How about Media_TBMv2 similar to my comment below?
+ """Obtains media metrics using TBMv2. Will eventually replace Media class."""
+ page_set = page_sets.ToughVideoCasesPageSet
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ categories = [
+ # For cpuTimeMetric:
+ 'toplevel',
+ ]
+ category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
+ ','.join(['-*'] + categories))
+ options = timeline_based_measurement.Options(category_filter)
+ options.SetTimelineBasedMetrics( ['cpuTimeMetric'])
CalebRouleau 2017/03/09 22:00:22 Remove extra space
+ return options
+
+ @classmethod
+ def Name(cls):
+ return 'media.tough_video_cases2'
CalebRouleau 2017/03/09 21:58:39 I think it is worth naming this 'media.tough_vid
+
+
# crbug.com/565180: Only include cases that don't report time_to_play
@benchmark.Disabled('android')
class MediaExtra(perf_benchmark.PerfBenchmark):
« no previous file with comments | « testing/buildbot/chromium.perf.fyi.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698