OLD | NEW |
---|---|
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 Loading... | |
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): | |
sullivan
2015/06/01 14:20:48
The class-level pydoc for these each benchmark wil
Dan Beam
2015/06/01 17:27:23
Done.
| |
77 test = power.QuiescentPower | |
78 page_set = page_sets.PluginPowerSaverPageSet | |
79 | |
80 def SetExtraBrowserOptions(self, options): | |
81 options.AppendExtraBrowserArgs(['--disable-plugin-power-saver']) | |
82 | |
83 @classmethod | |
84 def Name(cls): | |
85 return 'power.pps_control_disabled' | |
86 | |
87 | |
88 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') | |
89 class PowerPPSControlEnabled(perf_benchmark.PerfBenchmark): | |
90 test = power.QuiescentPower | |
91 page_set = page_sets.PluginPowerSaverPageSet | |
92 | |
93 def SetExtraBrowserOptions(self, options): | |
94 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) | |
95 | |
96 @classmethod | |
97 def Name(cls): | |
98 return 'power.pps_control_enabled' | |
99 | |
100 | |
101 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') | |
102 class PowerThrottledPlugins(perf_benchmark.PerfBenchmark): | |
103 test = power.QuiescentPower | |
104 page_set = page_sets.ThrottledPluginsPageSet | |
105 | |
106 def SetExtraBrowserOptions(self, options): | |
107 options.AppendExtraBrowserArgs(['--disable-plugin-power-saver']) | |
108 | |
109 @classmethod | |
110 def Name(cls): | |
111 return 'power.throttled_plugins_pps_disabled' | |
112 | |
113 | |
114 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') | |
115 class PowerThrottledPluginsPPS(perf_benchmark.PerfBenchmark): | |
116 test = power.QuiescentPower | |
117 page_set = page_sets.ThrottledPluginsPageSet | |
118 | |
119 def SetExtraBrowserOptions(self, options): | |
120 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) | |
121 | |
122 @classmethod | |
123 def Name(cls): | |
124 return 'power.throttled_plugins_pps_enabled' | |
OLD | NEW |