| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (possible_browser.browser_type == 'reference' and | 80 if (possible_browser.browser_type == 'reference' and |
| 81 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): | 81 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): |
| 82 return True | 82 return True |
| 83 return not possible_browser.platform.HasBattOrConnected() | 83 return not possible_browser.platform.HasBattOrConnected() |
| 84 | 84 |
| 85 @classmethod | 85 @classmethod |
| 86 def Name(cls): | 86 def Name(cls): |
| 87 return 'battor.system_health_loading_mobile' | 87 return 'battor.system_health_loading_mobile' |
| 88 | 88 |
| 89 | 89 |
| 90 @benchmark.Disabled('android') # crbug.com/618330 | |
| 91 class BattOrPowerCases(_BattOrBenchmark): | 90 class BattOrPowerCases(_BattOrBenchmark): |
| 92 page_set = page_sets.power_cases.PowerCasesPageSet | 91 page_set = page_sets.power_cases.PowerCasesPageSet |
| 93 | 92 |
| 94 @classmethod | 93 @classmethod |
| 95 def Name(cls): | 94 def Name(cls): |
| 96 return 'battor.power_cases' | 95 return 'battor.power_cases' |
| 97 | 96 |
| 98 | 97 |
| 99 @benchmark.Disabled('android') # crbug.com/618330 | |
| 100 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): | 98 class BattOrPowerCasesNoChromeTrace(_BattOrBenchmark): |
| 101 page_set = page_sets.power_cases.PowerCasesPageSet | 99 page_set = page_sets.power_cases.PowerCasesPageSet |
| 102 | 100 |
| 103 def CreateTimelineBasedMeasurementOptions(self): | 101 def CreateTimelineBasedMeasurementOptions(self): |
| 104 options = timeline_based_measurement.Options() | 102 options = timeline_based_measurement.Options() |
| 105 options.config.enable_battor_trace = True | 103 options.config.enable_battor_trace = True |
| 106 options.config.enable_chrome_trace = False | 104 options.config.enable_chrome_trace = False |
| 107 options.config.chrome_trace_config.SetDefaultOverheadFilter() | 105 options.config.chrome_trace_config.SetDefaultOverheadFilter() |
| 108 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) | 106 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) |
| 109 return options | 107 return options |
| 110 | 108 |
| 111 @classmethod | 109 @classmethod |
| 112 def Name(cls): | 110 def Name(cls): |
| 113 return 'battor.power_cases_no_chrome_trace' | 111 return 'battor.power_cases_no_chrome_trace' |
| OLD | NEW |