| 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 import os | |
| 6 | |
| 7 from core import perf_benchmark | 5 from core import perf_benchmark |
| 8 from telemetry.web_perf import timeline_based_measurement | 6 from telemetry.web_perf import timeline_based_measurement |
| 9 import page_sets | 7 import page_sets |
| 10 from telemetry import benchmark | 8 from telemetry import benchmark |
| 11 | 9 |
| 12 | 10 |
| 13 # TODO(rnephew): Remove BattOr naming from all benchmarks once the BattOr tests | 11 # TODO(rnephew): Remove BattOr naming from all benchmarks once the BattOr tests |
| 14 # are the primary means of benchmarking power. | 12 # are the primary means of benchmarking power. |
| 15 class _BattOrBenchmark(perf_benchmark.PerfBenchmark): | 13 class _BattOrBenchmark(perf_benchmark.PerfBenchmark): |
| 16 | 14 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 27 | 25 |
| 28 @classmethod | 26 @classmethod |
| 29 def ShouldDisable(cls, possible_browser): | 27 def ShouldDisable(cls, possible_browser): |
| 30 # Only run if BattOr is detected. | 28 # Only run if BattOr is detected. |
| 31 if not possible_browser.platform.HasBattOrConnected(): | 29 if not possible_browser.platform.HasBattOrConnected(): |
| 32 return True | 30 return True |
| 33 | 31 |
| 34 # Galaxy S5s have problems with running system health metrics. | 32 # Galaxy S5s have problems with running system health metrics. |
| 35 # http://crbug.com/600463 | 33 # http://crbug.com/600463 |
| 36 galaxy_s5_type_name = 'SM-G900H' | 34 galaxy_s5_type_name = 'SM-G900H' |
| 37 if possible_browser.platform.GetDeviceTypeName() == galaxy_s5_type_name: | 35 return possible_browser.platform.GetDeviceTypeName() == galaxy_s5_type_name |
| 38 return True | |
| 39 | |
| 40 # TODO(charliea): The BattOr agent is failing intermittently on Mac. We | |
| 41 # still want it running on the FYI waterfall to track the flakiness, but | |
| 42 # want it disabled on the main perf waterfall until we can make things | |
| 43 # stable. | |
| 44 # http://crbug.com/634188 | |
| 45 return (possible_browser.platform.GetOSName() == 'mac' and | |
| 46 'BUILDBOT_MASTERNAME' in os.environ and | |
| 47 os.environ['BUILDBOT_MASTERNAME'] == 'chromium.perf') | |
| 48 | 36 |
| 49 @classmethod | 37 @classmethod |
| 50 def ShouldTearDownStateAfterEachStoryRun(cls): | 38 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 51 return True | 39 return True |
| 52 | 40 |
| 53 | 41 |
| 54 # android: See battor.android.tough_video_cases below | 42 # android: See battor.android.tough_video_cases below |
| 55 # win8: crbug.com/531618 | 43 # win8: crbug.com/531618 |
| 56 # crbug.com/565180: Only include cases that report time_to_play | 44 # crbug.com/565180: Only include cases that report time_to_play |
| 57 # Taken directly from media benchmark. | 45 # Taken directly from media benchmark. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 options = timeline_based_measurement.Options() | 109 options = timeline_based_measurement.Options() |
| 122 options.config.enable_battor_trace = True | 110 options.config.enable_battor_trace = True |
| 123 options.config.enable_chrome_trace = False | 111 options.config.enable_chrome_trace = False |
| 124 options.config.chrome_trace_config.SetDefaultOverheadFilter() | 112 options.config.chrome_trace_config.SetDefaultOverheadFilter() |
| 125 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) | 113 options.SetTimelineBasedMetrics(['powerMetric', 'clockSyncLatencyMetric']) |
| 126 return options | 114 return options |
| 127 | 115 |
| 128 @classmethod | 116 @classmethod |
| 129 def Name(cls): | 117 def Name(cls): |
| 130 return 'battor.power_cases_no_chrome_trace' | 118 return 'battor.power_cases_no_chrome_trace' |
| OLD | NEW |