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

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

Issue 2386083003: Add background stories to MobileSystemHealth (Closed)
Patch Set: Created 4 years, 2 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
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):

Powered by Google App Engine
This is Rietveld 408576698