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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 @benchmark.Enabled('mac') | 68 @benchmark.Enabled('mac') |
69 class PowerTop25(perf_benchmark.PerfBenchmark): | 69 class PowerTop25(perf_benchmark.PerfBenchmark): |
70 """Top 25 quiescent power test.""" | 70 """Top 25 quiescent power test.""" |
71 test = power.QuiescentPower | 71 test = power.QuiescentPower |
72 page_set = page_sets.Top25PageSet | 72 page_set = page_sets.Top25PageSet |
73 @classmethod | 73 @classmethod |
74 def Name(cls): | 74 def Name(cls): |
75 return 'power.top_25' | 75 return 'power.top_25' |
76 | 76 |
77 def CreateUserStorySet(self, _): | 77 def CreateStorySet(self, _): |
78 # Exclude techcrunch.com. It is not suitable for this benchmark because it | 78 # Exclude techcrunch.com. It is not suitable for this benchmark because it |
79 # does not consistently become quiescent within 60 seconds. | 79 # does not consistently become quiescent within 60 seconds. |
80 user_stories = self.page_set() | 80 user_stories = self.page_set() |
81 found = next((x for x in user_stories if 'techcrunch.com' in x.url), None) | 81 found = next((x for x in user_stories if 'techcrunch.com' in x.url), None) |
82 if found: | 82 if found: |
83 user_stories.RemoveUserStory(found) | 83 user_stories.RemoveUserStory(found) |
84 return user_stories | 84 return user_stories |
85 | 85 |
86 | 86 |
87 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') | 87 @benchmark.Enabled('linux', 'mac', 'win', 'chromeos') |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 test = power.QuiescentPower | 141 test = power.QuiescentPower |
142 page_set = page_sets.ThrottledPluginsPageSet | 142 page_set = page_sets.ThrottledPluginsPageSet |
143 options = {'pageset_repeat': 5} | 143 options = {'pageset_repeat': 5} |
144 | 144 |
145 def SetExtraBrowserOptions(self, options): | 145 def SetExtraBrowserOptions(self, options): |
146 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) | 146 options.AppendExtraBrowserArgs(['--enable-plugin-power-saver']) |
147 | 147 |
148 @classmethod | 148 @classmethod |
149 def Name(cls): | 149 def Name(cls): |
150 return 'power.throttled_plugins_pps_enabled' | 150 return 'power.throttled_plugins_pps_enabled' |
OLD | NEW |