| Index: tools/perf/benchmarks/system_health.py
|
| diff --git a/tools/perf/benchmarks/system_health.py b/tools/perf/benchmarks/system_health.py
|
| index 2d80785a99da3ac35da7d034cc2eb86f70e8efc2..e4f872538ee4e8620b4c87dd02bd5e48eae83a6e 100644
|
| --- a/tools/perf/benchmarks/system_health.py
|
| +++ b/tools/perf/benchmarks/system_health.py
|
| @@ -16,9 +16,70 @@ import page_sets
|
| _IGNORED_STATS_RE = re.compile(r'_(std|count|max|min|sum|pct_\d{4}(_\d+)?)$')
|
|
|
|
|
| +class _CommonSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
|
| + """Chrome Common System Health Benchmark.
|
| +
|
| + This test suite contains system health benchmarks that can be collected
|
| + together due to the low overhead of the tracing agents required. If a
|
| + benchmark does have significant overhead, it should either:
|
| +
|
| + 1) Be rearchitected such that it doesn't. This is the most preferred option.
|
| + 2) Be run in a separate test suite (e.g. memory).
|
| +
|
| + https://goo.gl/Jek2NL.
|
| + """
|
| +
|
| + def CreateTimelineBasedMeasurementOptions(self):
|
| + options = timeline_based_measurement.Options(
|
| + chrome_trace_category_filter.ChromeTraceCategoryFilter())
|
| + options.config.chrome_trace_config.category_filter.AddFilterString('rail')
|
| + options.config.enable_battor_trace = True
|
| + options.config.enable_chrome_trace = True
|
| + return options
|
| +
|
| + def CreateStorySet(self, options):
|
| + return page_sets.SystemHealthStorySet(platform=self.PLATFORM)
|
| +
|
| + @classmethod
|
| + def ShouldTearDownStateAfterEachStoryRun(cls):
|
| + return True
|
| +
|
| + @classmethod
|
| + def Name(cls):
|
| + return 'system_health.common_%s' % cls.PLATFORM
|
| +
|
| +
|
| +class DesktopCommonSystemHealth(_CommonSystemHealthBenchmark):
|
| + """Desktop Chrome Energy System Health Benchmark."""
|
| + PLATFORM = 'desktop'
|
| +
|
| + @classmethod
|
| + def ShouldDisable(cls, possible_browser):
|
| + # http://crbug.com/624355 (reference builds).
|
| + return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or
|
| + possible_browser.browser_type == 'reference')
|
| +
|
| +
|
| +class MobileCommonSystemHealth(_CommonSystemHealthBenchmark):
|
| + """Mobile Chrome Energy System Health Benchmark."""
|
| + PLATFORM = 'mobile'
|
| +
|
| + @classmethod
|
| + def ShouldDisable(cls, possible_browser):
|
| + # http://crbug.com/612144
|
| + if (possible_browser.browser_type == 'reference' and
|
| + possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'):
|
| + return True
|
| +
|
| + return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
|
| +
|
| +
|
| class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark):
|
| """Chrome Memory System Health Benchmark.
|
|
|
| + This test suite is run separately from the common one due to the high overhead
|
| + of memory tracing.
|
| +
|
| https://goo.gl/Jek2NL.
|
| """
|
|
|
|
|