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

Side by Side 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, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/benchmarks/tab_switching.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from core import perf_benchmark 5 from core import perf_benchmark
6 6
7 from benchmarks import silk_flags 7 from benchmarks import silk_flags
8 from measurements import power 8 from measurements import power
9 from telemetry import benchmark 9 from telemetry import benchmark
10 import page_sets 10 import page_sets
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return 'power.top_25' 63 return 'power.top_25'
64 64
65 def CreateUserStorySet(self, _): 65 def CreateUserStorySet(self, _):
66 # Exclude techcrunch.com. It is not suitable for this benchmark because it 66 # Exclude techcrunch.com. It is not suitable for this benchmark because it
67 # does not consistently become quiescent within 60 seconds. 67 # does not consistently become quiescent within 60 seconds.
68 user_stories = self.page_set() 68 user_stories = self.page_set()
69 found = next((x for x in user_stories if 'techcrunch.com' in x.url), None) 69 found = next((x for x in user_stories if 'techcrunch.com' in x.url), None)
70 if found: 70 if found:
71 user_stories.RemoveUserStory(found) 71 user_stories.RemoveUserStory(found)
72 return user_stories 72 return user_stories
73
74
75 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
76 class PowerPPSControlDisabled(perf_benchmark.PerfBenchmark):
77 """A single page with a small-ish non-essential plugin. In this test, Plugin
78 Power Saver (PPS) is disabled, so the plugin should continue animating and
79 taking power."""
80 test = power.QuiescentPower
81 page_set = page_sets.PluginPowerSaverPageSet
82
83 def SetExtraBrowserOptions(self, options):
84 options.AppendExtraBrowserArgs(['--disable-plugin-power-saver'])
85
86 @classmethod
87 def Name(cls):
88 return 'power.pps_control_disabled'
89
90
91 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
92 class PowerPPSControlEnabled(perf_benchmark.PerfBenchmark):
93 """A single page with a small-ish non-essential plugin. In this test, Plugin
94 Power Saver (PPS) is enabled, so the plugin should be throttled (idle with a
95 "Click to play" button)."""
96 test = power.QuiescentPower
97 page_set = page_sets.PluginPowerSaverPageSet
98
99 def SetExtraBrowserOptions(self, options):
100 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver'])
101
102 @classmethod
103 def Name(cls):
104 return 'power.pps_control_enabled'
105
106
107 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
108 class PowerThrottledPlugins(perf_benchmark.PerfBenchmark):
109 """Tests that pages with flash ads take more power without Plugin Power Saver
110 (PPS) throttling them."""
111 test = power.QuiescentPower
112 page_set = page_sets.ThrottledPluginsPageSet
113
114 def SetExtraBrowserOptions(self, options):
115 options.AppendExtraBrowserArgs(['--disable-plugin-power-saver'])
116
117 @classmethod
118 def Name(cls):
119 return 'power.throttled_plugins_pps_disabled'
120
121
122 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos')
123 class PowerThrottledPluginsPPS(perf_benchmark.PerfBenchmark):
124 """Tests that pages with flash ads take less power with Plugin Power Saver
125 (PPS) enabled to throttle them."""
126 test = power.QuiescentPower
127 page_set = page_sets.ThrottledPluginsPageSet
128
129 def SetExtraBrowserOptions(self, options):
130 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver'])
131
132 @classmethod
133 def Name(cls):
134 return 'power.throttled_plugins_pps_enabled'
OLDNEW
« 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