| 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 12 matching lines...) Expand all Loading... |
| 23 def Name(cls): | 23 def Name(cls): |
| 24 return 'power.android_acceptance' | 24 return 'power.android_acceptance' |
| 25 | 25 |
| 26 | 26 |
| 27 @benchmark.Enabled('android') | 27 @benchmark.Enabled('android') |
| 28 class PowerTypical10Mobile(perf_benchmark.PerfBenchmark): | 28 class PowerTypical10Mobile(perf_benchmark.PerfBenchmark): |
| 29 """Android typical 10 mobile power test.""" | 29 """Android typical 10 mobile power test.""" |
| 30 test = power.Power | 30 test = power.Power |
| 31 page_set = page_sets.Typical10MobilePageSet | 31 page_set = page_sets.Typical10MobilePageSet |
| 32 | 32 |
| 33 @classmethod |
| 34 def ShouldDisable(cls, possible_browser): # http://crbug.com/593152 |
| 35 return (possible_browser.browser_type == 'reference' and |
| 36 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| 37 |
| 33 def SetExtraBrowserOptions(self, options): | 38 def SetExtraBrowserOptions(self, options): |
| 34 options.full_performance_mode = False | 39 options.full_performance_mode = False |
| 35 | 40 |
| 36 @classmethod | 41 @classmethod |
| 37 def Name(cls): | 42 def Name(cls): |
| 38 return 'power.typical_10_mobile' | 43 return 'power.typical_10_mobile' |
| 39 | 44 |
| 40 | 45 |
| 41 @benchmark.Enabled('android') | 46 @benchmark.Enabled('android') |
| 42 class PowerToughAdCases(perf_benchmark.PerfBenchmark): | 47 class PowerToughAdCases(perf_benchmark.PerfBenchmark): |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 return 'power.gpu_rasterization.top_25' | 161 return 'power.gpu_rasterization.top_25' |
| 157 | 162 |
| 158 def CreateStorySet(self, _): | 163 def CreateStorySet(self, _): |
| 159 # Exclude techcrunch.com. It is not suitable for this benchmark because it | 164 # Exclude techcrunch.com. It is not suitable for this benchmark because it |
| 160 # does not consistently become quiescent within 60 seconds. | 165 # does not consistently become quiescent within 60 seconds. |
| 161 stories = self.page_set() | 166 stories = self.page_set() |
| 162 found = next((x for x in stories if 'techcrunch.com' in x.url), None) | 167 found = next((x for x in stories if 'techcrunch.com' in x.url), None) |
| 163 if found: | 168 if found: |
| 164 stories.RemoveStory(found) | 169 stories.RemoveStory(found) |
| 165 return stories | 170 return stories |
| OLD | NEW |