Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Unified Diff: tools/perf/benchmarks/system_health.py

Issue 2239053003: [system health] Add power system health benchmarks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
"""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698