| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from telemetry.timeline import chrome_trace_category_filter | 6 from telemetry.timeline import chrome_trace_category_filter |
| 7 from telemetry.web_perf import timeline_based_measurement | 7 from telemetry.web_perf import timeline_based_measurement |
| 8 import page_sets | 8 import page_sets |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 @benchmark.Disabled('android', 'win8') | 52 @benchmark.Disabled('android', 'win8') |
| 53 class BattOrToughVideoCases(_BattOrBenchmark): | 53 class BattOrToughVideoCases(_BattOrBenchmark): |
| 54 """Obtains media metrics for key user scenarios.""" | 54 """Obtains media metrics for key user scenarios.""" |
| 55 page_set = page_sets.ToughVideoCasesPageSet | 55 page_set = page_sets.ToughVideoCasesPageSet |
| 56 | 56 |
| 57 @classmethod | 57 @classmethod |
| 58 def Name(cls): | 58 def Name(cls): |
| 59 return 'battor.tough_video_cases' | 59 return 'battor.tough_video_cases' |
| 60 | 60 |
| 61 | 61 |
| 62 # TODO(rnephew): Add a version that scrolls. | |
| 63 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark): | |
| 64 """Desktop Chrome Memory System Health Benchmark.""" | |
| 65 | |
| 66 def CreateStorySet(self, options): | |
| 67 return page_sets.SystemHealthStorySet(platform='desktop', case='load') | |
| 68 | |
| 69 @classmethod | |
| 70 def ShouldDisable(cls, possible_browser): | |
| 71 return ( | |
| 72 super(BattOrSystemHealthLoadingDesktop, cls).ShouldDisable( | |
| 73 possible_browser) or | |
| 74 possible_browser.platform.GetDeviceTypeName() != 'Desktop') | |
| 75 | |
| 76 @classmethod | |
| 77 def Name(cls): | |
| 78 return 'battor.system_health_loading_desktop' | |
| 79 | |
| 80 | |
| 81 class BattOrSystemHealthLoadingMobile(_BattOrBenchmark): | |
| 82 """Mobile Chrome Memory System Health Benchmark.""" | |
| 83 | |
| 84 def CreateStorySet(self, options): | |
| 85 return page_sets.SystemHealthStorySet(platform='mobile', case='load') | |
| 86 | |
| 87 @classmethod | |
| 88 def ShouldDisable(cls, possible_browser): | |
| 89 if possible_browser.platform.GetDeviceTypeName() == 'Desktop': | |
| 90 return True | |
| 91 if (possible_browser.browser_type == 'reference' and | |
| 92 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): | |
| 93 return True | |
| 94 | |
| 95 return super(BattOrSystemHealthLoadingMobile, cls).ShouldDisable( | |
| 96 possible_browser) | |
| 97 | |
| 98 @classmethod | |
| 99 def Name(cls): | |
| 100 return 'battor.system_health_loading_mobile' | |
| 101 | |
| 102 | |
| 103 class BattOrPowerCases(_BattOrBenchmark): | 62 class BattOrPowerCases(_BattOrBenchmark): |
| 104 page_set = page_sets.power_cases.PowerCasesPageSet | 63 page_set = page_sets.power_cases.PowerCasesPageSet |
| 105 | 64 |
| 106 @classmethod | 65 @classmethod |
| 107 def Name(cls): | 66 def Name(cls): |
| 108 return 'battor.power_cases' | 67 return 'battor.power_cases' |
| 109 | 68 |
| 110 | 69 |
| 111 @benchmark.Disabled('all') # crbug.com/651384. | 70 @benchmark.Disabled('all') # crbug.com/651384. |
| 112 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): | 71 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): |
| (...skipping 26 matching lines...) Expand all Loading... |
| 139 @benchmark.Enabled('mac') | 98 @benchmark.Enabled('mac') |
| 140 class BattOrSteadyStatePages(_BattOrBenchmark): | 99 class BattOrSteadyStatePages(_BattOrBenchmark): |
| 141 | 100 |
| 142 def CreateStorySet(self, options): | 101 def CreateStorySet(self, options): |
| 143 # We want it to wait for 30 seconds to be comparable to legacy power tests. | 102 # We want it to wait for 30 seconds to be comparable to legacy power tests. |
| 144 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) | 103 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) |
| 145 | 104 |
| 146 @classmethod | 105 @classmethod |
| 147 def Name(cls): | 106 def Name(cls): |
| 148 return 'battor.steady_state' | 107 return 'battor.steady_state' |
| OLD | NEW |