| 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 import page_sets | 9 import page_sets |
| 10 from telemetry import benchmark | 10 from telemetry import benchmark |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 return 'power.gpu_rasterization.top_25' | 171 return 'power.gpu_rasterization.top_25' |
| 172 | 172 |
| 173 def CreateStorySet(self, _): | 173 def CreateStorySet(self, _): |
| 174 # Exclude techcrunch.com. It is not suitable for this benchmark because it | 174 # Exclude techcrunch.com. It is not suitable for this benchmark because it |
| 175 # does not consistently become quiescent within 60 seconds. | 175 # does not consistently become quiescent within 60 seconds. |
| 176 stories = self.page_set() | 176 stories = self.page_set() |
| 177 found = next((x for x in stories if 'techcrunch.com' in x.url), None) | 177 found = next((x for x in stories if 'techcrunch.com' in x.url), None) |
| 178 if found: | 178 if found: |
| 179 stories.RemoveStory(found) | 179 stories.RemoveStory(found) |
| 180 return stories | 180 return stories |
| 181 |
| 182 |
| 183 @benchmark.Enabled('mac') |
| 184 class PowerScrollingTrivialPage(perf_benchmark.PerfBenchmark): |
| 185 """Scroll a trivial page and measure power consumption.""" |
| 186 test = power.QuiescentPower |
| 187 page_set = page_sets.TrivialScrollStorySet |
| 188 |
| 189 @classmethod |
| 190 def Name(cls): |
| 191 return 'power.trivial_scroll' |
| OLD | NEW |