Chromium Code Reviews| Index: tools/perf/benchmarks/memory_benchmark.py |
| diff --git a/tools/perf/benchmarks/memory_health_plan.py b/tools/perf/benchmarks/memory_benchmark.py |
| similarity index 61% |
| rename from tools/perf/benchmarks/memory_health_plan.py |
| rename to tools/perf/benchmarks/memory_benchmark.py |
| index 14be34cbf3f10ca62aec10f793ad8f95beee3e28..c0c266577a551eb1a4b4392e4d71e280c90123eb 100644 |
| --- a/tools/perf/benchmarks/memory_health_plan.py |
| +++ b/tools/perf/benchmarks/memory_benchmark.py |
| @@ -13,14 +13,8 @@ from telemetry.web_perf import timeline_based_measurement |
| import page_sets |
| -RE_BENCHMARK_VALUES = re.compile('(fore|back)ground-memory_') |
| - |
| - |
| -@benchmark.Enabled('android') |
| -class MemoryHealthPlan(perf_benchmark.PerfBenchmark): |
| - """Timeline based benchmark for the Memory Health Plan.""" |
| - |
| - page_set = page_sets.MemoryHealthStory |
| +class _MemoryBenchmark(perf_benchmark.PerfBenchmark): |
| + """Base class for timeline based memory benchmarks.""" |
| def SetExtraBrowserOptions(self, options): |
| # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| @@ -34,10 +28,36 @@ class MemoryHealthPlan(perf_benchmark.PerfBenchmark): |
| filter_string='-*,blink.console,disabled-by-default-memory-infra') |
| return timeline_based_measurement.Options(overhead_level=trace_memory) |
| + |
| +@benchmark.Enabled('android') |
|
nednguyen
2015/09/04 02:01:28
Removed?
bashi
2015/09/04 02:37:11
Forgot to remove this.. Done.
|
| +class MemoryHealthPlan(_MemoryBenchmark): |
| + """Timeline based benchmark for the Memory Health Plan.""" |
| + |
| + _RE_BENCHMARK_VALUES = re.compile('(fore|back)ground-memory_') |
| + |
| + page_set = page_sets.MemoryHealthStory |
| + |
| @classmethod |
| def Name(cls): |
| return 'memory.memory_health_plan' |
| @classmethod |
| def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| - return bool(RE_BENCHMARK_VALUES.match(value.name)) |
| + return bool(cls._RE_BENCHMARK_VALUES.match(value.name)) |
| + |
| + |
| +class RendererMemoryBlinkMemoryMobile(_MemoryBenchmark): |
| + """Timeline based benchmark for measuring memory consumption on mobile |
| + sites on which blink's memory consumption is relatively high.""" |
| + |
| + _RE_RENDERER_VALUES = re.compile('.+-memory_.+_renderer') |
| + |
| + page_set = page_sets.BlinkMemoryMobilePageSet |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'memory.blink_memory_mobile' |
| + |
| + @classmethod |
| + def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| + return bool(cls._RE_RENDERER_VALUES.match(value.name)) |