| Index: tools/perf/benchmarks/tracing.py
|
| diff --git a/tools/perf/benchmarks/tracing.py b/tools/perf/benchmarks/tracing.py
|
| index 95cc44d197325c57e5d5aaa2913aed9c1976de26..f62942f9c1c1a6878d9c4b3d0e99291d93d42f9c 100644
|
| --- a/tools/perf/benchmarks/tracing.py
|
| +++ b/tools/perf/benchmarks/tracing.py
|
| @@ -4,6 +4,9 @@
|
|
|
| from core import perf_benchmark
|
|
|
| +from telemetry import benchmark
|
| +from telemetry.timeline import tracing_category_filter
|
| +from telemetry.timeline import tracing_config
|
| from telemetry.web_perf import timeline_based_measurement
|
|
|
| import page_sets
|
| @@ -22,3 +25,27 @@ class TracingWithDebugOverhead(perf_benchmark.PerfBenchmark):
|
| @classmethod
|
| def Name(cls):
|
| return 'tracing.tracing_with_debug_overhead'
|
| +
|
| +
|
| +# TODO(ssid): Enable on reference builds once stable browser starts supporting
|
| +# background mode memory-infra. crbug.com/621195.
|
| +@benchmark.Disabled('reference')
|
| +class TracingWithBackgroundMemoryInfra(perf_benchmark.PerfBenchmark):
|
| + """Measures the overhead of background memory-infra dumps"""
|
| + page_set = page_sets.Top10PageSet
|
| +
|
| + def CreateTimelineBasedMeasurementOptions(self):
|
| + # Enable only memory-infra category with periodic background mode dumps
|
| + # every 200 milliseconds.
|
| + trace_memory = tracing_category_filter.TracingCategoryFilter(
|
| + filter_string='-*,blink.console,disabled-by-default-memory-infra')
|
| + options = timeline_based_measurement.Options(overhead_level=trace_memory)
|
| + memory_dump_config = tracing_config.MemoryDumpConfig()
|
| + memory_dump_config.AddTrigger('background', 200)
|
| + options.config.SetMemoryDumpConfig(memory_dump_config)
|
| + options.SetTimelineBasedMetric('tracingMetric')
|
| + return options
|
| +
|
| + @classmethod
|
| + def Name(cls):
|
| + return 'tracing.tracing_with_background_memory_infra'
|
|
|