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

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

Issue 2855133007: Add memory metrics to TBMv2 media benchmarks (Closed)
Patch Set: Rebase Created 3 years, 7 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 | « no previous file | 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 0469ca2c34299b9a2651e3e21712743d5dc78801..a985c7500bff211fa2ff8fa9d6c68c83e39c5545 100644
--- a/tools/perf/benchmarks/media.py
+++ b/tools/perf/benchmarks/media.py
@@ -7,6 +7,7 @@ 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.timeline import chrome_trace_config
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
from telemetry.web_perf import timeline_based_measurement
@@ -74,7 +75,8 @@ class MediaAndroidToughVideoCases(perf_benchmark.PerfBenchmark):
class _MediaTBMv2Benchmark(perf_benchmark.PerfBenchmark):
- page_set = page_sets.ToughVideoCasesPageSet
+ def CreateStorySet(self, options):
+ return page_sets.ToughVideoCasesPageSet(measure_memory=True)
def CreateTimelineBasedMeasurementOptions(self):
category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
@@ -86,9 +88,19 @@ class _MediaTBMv2Benchmark(perf_benchmark.PerfBenchmark):
# time to different activities, such as video_animation, etc.
category_filter.AddIncludedCategory('rail')
+ # Collect memory data.
+ category_filter.AddDisabledByDefault('disabled-by-default-memory-infra')
+
options = timeline_based_measurement.Options(category_filter)
options.config.enable_battor_trace = True
- options.SetTimelineBasedMetrics(['powerMetric', 'cpuTimeMetric'])
+ options.config.enable_android_graphics_memtrack = True
+
+ # Setting an empty memory dump config disables periodic dumps.
+ options.config.chrome_trace_config.SetMemoryDumpConfig(
+ chrome_trace_config.MemoryDumpConfig())
+
+ options.SetTimelineBasedMetrics(['powerMetric',
+ 'cpuTimeMetric', 'memoryMetric'])
return options
« no previous file with comments | « no previous file | tools/perf/page_sets/tough_video_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698