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 59% |
| rename from tools/perf/benchmarks/memory_health_plan.py |
| rename to tools/perf/benchmarks/memory_benchmark.py |
| index 14be34cbf3f10ca62aec10f793ad8f95beee3e28..d4fdafae1f09eafb45d279d7f9db407a6b7f3f50 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 benchmark.""" |
|
perezju
2015/09/02 09:30:45
nit: benchmark -> benchmarks
bashi
2015/09/03 23:12:21
Done.
|
| def SetExtraBrowserOptions(self, options): |
| # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| @@ -34,10 +28,38 @@ 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') |
| +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(MemoryHealthPlan._RE_BENCHMARK_VALUES.match(value.name)) |
|
perezju
2015/09/02 09:30:45
nit: MemoryHealthPlan -> cls
bashi
2015/09/03 23:12:21
Done.
|
| + |
| + |
| +@benchmark.Enabled('android') |
|
perezju
2015/09/02 09:30:45
Is there anything android-specific about this benc
nednguyen
2015/09/02 16:30:07
The fact that it uses BlinkMemoryMobilePageSet tel
bashi
2015/09/03 23:12:21
BlinkMemoryMobilePage already uses ShareMobilePage
|
| +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( |
| + RendererMemoryBlinkMemoryMobile._RE_RENDERER_VALUES.match(value.name)) |
|
perezju
2015/09/02 09:30:45
nit: RendererMemoryBlinkMemoryMobile -> cls
bashi
2015/09/03 23:12:21
Done.
|