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 2d80785a99da3ac35da7d034cc2eb86f70e8efc2..d1630999abc5cd3e382000cb1aee54ed05a13aef 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. |
|
petrcermak
2016/08/12 14:35:00
maybe add "(such as memory)"?
charliea (OOO until 10-5)
2016/08/12 15:07:28
Done.
|
| + |
| + https://goo.gl/Jek2NL. |
| + """ |
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + options = timeline_based_measurement.Options() |
| + options.config.enable_battor_trace = True |
| + options.config.enable_chrome_trace = True |
| + options.config.chrome_trace_config.SetDefaultOverheadFilter() |
| + options.SetTimelineBasedMetrics(['clockSyncLatencyMetric', 'powerMetric']) |
| + 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. |
| """ |