| 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 11 matching lines...) Expand all Loading... |
| 22 options.config.atrace_config.categories = ['sched'] | 22 options.config.atrace_config.categories = ['sched'] |
| 23 options.config.enable_battor_trace = True | 23 options.config.enable_battor_trace = True |
| 24 options.config.enable_chrome_trace = True | 24 options.config.enable_chrome_trace = True |
| 25 options.config.enable_cpu_trace = True | 25 options.config.enable_cpu_trace = True |
| 26 options.SetTimelineBasedMetrics( | 26 options.SetTimelineBasedMetrics( |
| 27 ['powerMetric', 'clockSyncLatencyMetric', 'cpuTimeMetric']) | 27 ['powerMetric', 'clockSyncLatencyMetric', 'cpuTimeMetric']) |
| 28 return options | 28 return options |
| 29 | 29 |
| 30 @classmethod | 30 @classmethod |
| 31 def ShouldDisable(cls, possible_browser): | 31 def ShouldDisable(cls, possible_browser): |
| 32 # Only run if BattOr is detected. | 32 return not possible_browser.platform.HasBattOrConnected() |
| 33 if not possible_browser.platform.HasBattOrConnected(): | |
| 34 return True | |
| 35 | |
| 36 # Galaxy S5s have problems with running system health metrics. | |
| 37 # http://crbug.com/600463 | |
| 38 galaxy_s5_type_name = 'SM-G900H' | |
| 39 return possible_browser.platform.GetDeviceTypeName() == galaxy_s5_type_name | |
| 40 | 33 |
| 41 @classmethod | 34 @classmethod |
| 42 def ShouldTearDownStateAfterEachStoryRun(cls): | 35 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 43 return True | 36 return True |
| 44 | 37 |
| 45 | 38 |
| 46 # android: See battor.android.tough_video_cases below | 39 # android: See battor.android.tough_video_cases below |
| 47 # win8: crbug.com/531618 | 40 # win8: crbug.com/531618 |
| 48 # crbug.com/565180: Only include cases that report time_to_play | 41 # crbug.com/565180: Only include cases that report time_to_play |
| 49 # Taken directly from media benchmark. | 42 # Taken directly from media benchmark. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 79 @benchmark.Enabled('mac') | 72 @benchmark.Enabled('mac') |
| 80 class BattOrSteadyStatePages(_BattOrBenchmark): | 73 class BattOrSteadyStatePages(_BattOrBenchmark): |
| 81 | 74 |
| 82 def CreateStorySet(self, options): | 75 def CreateStorySet(self, options): |
| 83 # We want it to wait for 30 seconds to be comparable to legacy power tests. | 76 # We want it to wait for 30 seconds to be comparable to legacy power tests. |
| 84 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) | 77 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) |
| 85 | 78 |
| 86 @classmethod | 79 @classmethod |
| 87 def Name(cls): | 80 def Name(cls): |
| 88 return 'battor.steady_state' | 81 return 'battor.steady_state' |
| OLD | NEW |