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

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..7a0af423bc0f80559e78377f9fb9c27e89fdf143 100644
--- a/tools/perf/benchmarks/system_health.py
+++ b/tools/perf/benchmarks/system_health.py
@@ -56,6 +56,38 @@ class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark):
return not _IGNORED_STATS_RE.search(value.name)
+class _PowerSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
petrcermak 2016/08/12 09:03:00 Instead of interleaving the classes: _MemorySyste
charliea (OOO until 10-5) 2016/08/12 14:18:43 Done.
+ """Chrome Power System Health Benchmark.
+
+ 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(['powerMetric', 'clockSyncLatencyMetric'])
+ 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.power_%s' % cls.PLATFORM
+
+ @classmethod
+ def ValueCanBeAddedPredicate(cls, value, is_first_result):
+ # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
+ # is able to cope with the data load generated by TBMv2 metrics.
+ return not _IGNORED_STATS_RE.search(value.name)
petrcermak 2016/08/12 09:03:00 How many values does your metric generate? If it's
charliea (OOO until 10-5) 2016/08/12 14:18:43 Done.
+
+
class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark):
"""Desktop Chrome Memory System Health Benchmark."""
PLATFORM = 'desktop'
@@ -81,6 +113,33 @@ class MobileMemorySystemHealth(_MemorySystemHealthBenchmark):
return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
+class DesktopPowerSystemHealth(_PowerSystemHealthBenchmark):
+ """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' or
+ not possible_browser.platform.HasBattOrConnected())
+
+
+class MobilePowerSystemHealth(_PowerSystemHealthBenchmark):
+ """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' or
+ not possible_browser.platform.HasBattOrConnected())
+
+
@benchmark.Enabled('android-webview')
class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
"""Webview startup time benchmark
« 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