Chromium Code Reviews| Index: tools/perf/benchmarks/system_health.py |
| diff --git a/tools/perf/benchmarks/system_health.py b/tools/perf/benchmarks/system_health.py |
| index 75862ea6200a45a1d08170a9e72728d9a5c160be..9dd96996c10400fbf1e411d3b6737adb386eb441 100644 |
| --- a/tools/perf/benchmarks/system_health.py |
| +++ b/tools/perf/benchmarks/system_health.py |
| @@ -99,8 +99,15 @@ class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| return options |
| def CreateStorySet(self, options): |
| - return page_sets.SystemHealthStorySet(platform=self.PLATFORM, |
| - take_memory_measurement=True) |
| + measure_in_background = self.ShouldBackgroundChrome() |
| + return page_sets.SystemHealthStorySet( |
| + platform=self.PLATFORM, |
| + take_memory_measurement=True, |
| + measure_in_background=measure_in_background) |
| + |
| + @classmethod |
| + def ShouldBackgroundChrome(cls): |
| + return False |
| @classmethod |
| def ShouldTearDownStateAfterEachStoryRun(cls): |
| @@ -108,7 +115,10 @@ class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| @classmethod |
| def Name(cls): |
| - return 'system_health.memory_%s' % cls.PLATFORM |
| + if cls.ShouldBackgroundChrome(): |
| + return 'system_health.memory_%s_background' % cls.PLATFORM |
| + else: |
| + return 'system_health.memory_%s' % cls.PLATFORM |
|
perezju
2016/10/05 13:14:54
Instead of adding a new benchmark, I think we shou
perezju
2016/10/05 13:18:10
Ignore that comment. Noise from a previous draft I
|
| @classmethod |
| def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| @@ -141,6 +151,13 @@ class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): |
| return possible_browser.platform.GetDeviceTypeName() == 'Desktop' |
| +class MobileMemoryBackgroundSystemHealth(MobileMemorySystemHealth): |
| + """Mobile Chrome Background Memory System Health Benchmark.""" |
| + PLATFORM = 'mobile' |
| + |
| + @classmethod |
| + def ShouldBackgroundChrome(cls): |
| + return True |
| @benchmark.Enabled('android-webview') |
| class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): |