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

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

Issue 1144383005: Perf tests for Plugin Power Saver take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sullivan@ review Created 5 years, 7 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 | tools/perf/benchmarks/tab_switching.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/power.py
diff --git a/tools/perf/benchmarks/power.py b/tools/perf/benchmarks/power.py
index ba29d15f0a8311f09758b75121f8cdad8016175e..bc59b5c640e932fe2f7fc82e0fb1f2558bcb38e0 100644
--- a/tools/perf/benchmarks/power.py
+++ b/tools/perf/benchmarks/power.py
@@ -70,3 +70,65 @@ class PowerTop25(perf_benchmark.PerfBenchmark):
if found:
user_stories.RemoveUserStory(found)
return user_stories
+
+
+@benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
+class PowerPPSControlDisabled(perf_benchmark.PerfBenchmark):
+ """A single page with a small-ish non-essential plugin. In this test, Plugin
+ Power Saver (PPS) is disabled, so the plugin should continue animating and
+ taking power."""
+ test = power.QuiescentPower
+ page_set = page_sets.PluginPowerSaverPageSet
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs(['--disable-plugin-power-saver'])
+
+ @classmethod
+ def Name(cls):
+ return 'power.pps_control_disabled'
+
+
+@benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
+class PowerPPSControlEnabled(perf_benchmark.PerfBenchmark):
+ """A single page with a small-ish non-essential plugin. In this test, Plugin
+ Power Saver (PPS) is enabled, so the plugin should be throttled (idle with a
+ "Click to play" button)."""
+ test = power.QuiescentPower
+ page_set = page_sets.PluginPowerSaverPageSet
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs(['--enable-plugin-power-saver'])
+
+ @classmethod
+ def Name(cls):
+ return 'power.pps_control_enabled'
+
+
+@benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
+class PowerThrottledPlugins(perf_benchmark.PerfBenchmark):
+ """Tests that pages with flash ads take more power without Plugin Power Saver
+ (PPS) throttling them."""
+ test = power.QuiescentPower
+ page_set = page_sets.ThrottledPluginsPageSet
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs(['--disable-plugin-power-saver'])
+
+ @classmethod
+ def Name(cls):
+ return 'power.throttled_plugins_pps_disabled'
+
+
+@benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
+class PowerThrottledPluginsPPS(perf_benchmark.PerfBenchmark):
+ """Tests that pages with flash ads take less power with Plugin Power Saver
+ (PPS) enabled to throttle them."""
+ test = power.QuiescentPower
+ page_set = page_sets.ThrottledPluginsPageSet
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs(['--enable-plugin-power-saver'])
+
+ @classmethod
+ def Name(cls):
+ return 'power.throttled_plugins_pps_enabled'
« no previous file with comments | « no previous file | tools/perf/benchmarks/tab_switching.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698