[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / perf / benchmarks / memory_health_plan.py
blobc4c8750d0d8baec9a04df280a3cdb104d6255de5
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import re
7 from core import perf_benchmark
9 from telemetry import benchmark
10 from telemetry.timeline import tracing_category_filter
11 from telemetry.web_perf import timeline_based_measurement
13 import page_sets
16 RE_BENCHMARK_VALUES = re.compile('(fore|back)ground-memory_')
19 @benchmark.Enabled('android')
20 class MemoryHealthPlan(perf_benchmark.PerfBenchmark):
21 """Timeline based benchmark for the Memory Health Plan."""
23 page_set = page_sets.MemoryHealthStory
25 def CreateTimelineBasedMeasurementOptions(self):
26 trace_memory = tracing_category_filter.TracingCategoryFilter(
27 filter_string='disabled-by-default-memory-infra')
28 return timeline_based_measurement.Options(overhead_level=trace_memory)
30 @classmethod
31 def Name(cls):
32 return 'memory.memory_health_plan'
34 @classmethod
35 def ValueCanBeAddedPredicate(cls, value, is_first_result):
36 return bool(RE_BENCHMARK_VALUES.match(value.name))