| 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.web_perf import timeline_based_measurement | 6 from telemetry.web_perf import timeline_based_measurement |
| 7 import page_sets | 7 import page_sets |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 | 9 |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 @classmethod | 48 @classmethod |
| 49 def Name(cls): | 49 def Name(cls): |
| 50 return 'battor.tough_video_cases' | 50 return 'battor.tough_video_cases' |
| 51 | 51 |
| 52 | 52 |
| 53 # TODO(rnephew): Add a version that scrolls. | 53 # TODO(rnephew): Add a version that scrolls. |
| 54 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark): | 54 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark): |
| 55 """Desktop Chrome Memory System Health Benchmark.""" | 55 """Desktop Chrome Memory System Health Benchmark.""" |
| 56 | 56 |
| 57 def CreateStorySet(self, options): | 57 def CreateStorySet(self, options): |
| 58 return page_sets.DesktopSystemHealthStorySet(take_memory_measurement=False) | 58 return page_sets.SystemHealthStorySet(platform='desktop', |
| 59 story_name_regex=r'load:.*') |
| 59 | 60 |
| 60 @classmethod | 61 @classmethod |
| 61 def ShouldDisable(cls, possible_browser): | 62 def ShouldDisable(cls, possible_browser): |
| 62 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or | 63 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or |
| 63 not possible_browser.platform.HasBattOrConnected()) | 64 not possible_browser.platform.HasBattOrConnected()) |
| 64 | 65 |
| 65 @classmethod | 66 @classmethod |
| 66 def Name(cls): | 67 def Name(cls): |
| 67 return 'battor.system_health_loading_desktop' | 68 return 'battor.system_health_loading_desktop' |
| 68 | 69 |
| 69 | 70 |
| 70 class BattOrSystemHealthLoadingMobile(_BattOrBenchmark): | 71 class BattOrSystemHealthLoadingMobile(_BattOrBenchmark): |
| 71 """Mobile Chrome Memory System Health Benchmark.""" | 72 """Mobile Chrome Memory System Health Benchmark.""" |
| 72 | 73 |
| 73 def CreateStorySet(self, options): | 74 def CreateStorySet(self, options): |
| 74 return page_sets.MobileSystemHealthStorySet(take_memory_measurement=False) | 75 return page_sets.SystemHealthStorySet(platform='mobile', |
| 76 story_name_regex=r'load:.*') |
| 75 | 77 |
| 76 @classmethod | 78 @classmethod |
| 77 def ShouldDisable(cls, possible_browser): | 79 def ShouldDisable(cls, possible_browser): |
| 78 if possible_browser.platform.GetDeviceTypeName() == 'Desktop': | 80 if possible_browser.platform.GetDeviceTypeName() == 'Desktop': |
| 79 return True | 81 return True |
| 80 if (possible_browser.browser_type == 'reference' and | 82 if (possible_browser.browser_type == 'reference' and |
| 81 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): | 83 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): |
| 82 return True | 84 return True |
| 83 return not possible_browser.platform.HasBattOrConnected() | 85 return not possible_browser.platform.HasBattOrConnected() |
| 84 | 86 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 104 options = timeline_based_measurement.Options() | 106 options = timeline_based_measurement.Options() |
| 105 options.config.enable_battor_trace = True | 107 options.config.enable_battor_trace = True |
| 106 options.config.enable_chrome_trace = False | 108 options.config.enable_chrome_trace = False |
| 107 options.config.chrome_trace_config.SetDefaultOverheadFilter() | 109 options.config.chrome_trace_config.SetDefaultOverheadFilter() |
| 108 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) | 110 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) |
| 109 return options | 111 return options |
| 110 | 112 |
| 111 @classmethod | 113 @classmethod |
| 112 def Name(cls): | 114 def Name(cls): |
| 113 return 'battor.power_cases_no_chrome_trace' | 115 return 'battor.power_cases_no_chrome_trace' |
| OLD | NEW |