Chromium Code Reviews| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 @benchmark.Disabled('android', 'win8') | 48 @benchmark.Disabled('android', 'win8') |
| 49 class BattOrToughVideoCases(_BattOrBenchmark): | 49 class BattOrToughVideoCases(_BattOrBenchmark): |
| 50 """Obtains media metrics for key user scenarios.""" | 50 """Obtains media metrics for key user scenarios.""" |
| 51 page_set = page_sets.ToughVideoCasesPageSet | 51 page_set = page_sets.ToughVideoCasesPageSet |
| 52 | 52 |
| 53 @classmethod | 53 @classmethod |
| 54 def Name(cls): | 54 def Name(cls): |
| 55 return 'battor.tough_video_cases' | 55 return 'battor.tough_video_cases' |
| 56 | 56 |
| 57 | 57 |
| 58 class BattOrSystemHealthMediaDesktop(_BattOrBenchmark): | |
|
petrcermak
2016/09/13 16:49:03
nit: can you add a docstring below here?
rnephew (Reviews Here)
2016/09/13 18:52:40
Done.
| |
| 59 def CreateStorySet(self, options): | |
|
petrcermak
2016/09/13 16:49:03
nit: add blank line above this one
rnephew (Reviews Here)
2016/09/13 18:52:40
Done.
| |
| 60 return page_sets.SystemHealthStorySet(platform='desktop', case='media') | |
| 61 @classmethod | |
|
petrcermak
2016/09/13 16:49:03
nit: add blank line above this one
rnephew (Reviews Here)
2016/09/13 18:52:40
Done.
| |
| 62 def Name(cls): | |
| 63 return 'battor.system_health_media_desktop' | |
| 64 | |
| 58 # TODO(rnephew): Add a version that scrolls. | 65 # TODO(rnephew): Add a version that scrolls. |
| 59 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark): | 66 class BattOrSystemHealthLoadingDesktop(_BattOrBenchmark): |
| 60 """Desktop Chrome Memory System Health Benchmark.""" | 67 """Desktop Chrome Memory System Health Benchmark.""" |
| 61 | 68 |
| 62 def CreateStorySet(self, options): | 69 def CreateStorySet(self, options): |
| 63 return page_sets.SystemHealthStorySet(platform='desktop', case='load') | 70 return page_sets.SystemHealthStorySet(platform='desktop', case='load') |
| 64 | 71 |
| 65 @classmethod | 72 @classmethod |
| 66 def ShouldDisable(cls, possible_browser): | 73 def ShouldDisable(cls, possible_browser): |
| 67 return ( | 74 return ( |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 @benchmark.Enabled('mac') | 141 @benchmark.Enabled('mac') |
| 135 class BattOrSteadyStatePages(_BattOrBenchmark): | 142 class BattOrSteadyStatePages(_BattOrBenchmark): |
| 136 | 143 |
| 137 def CreateStorySet(self, options): | 144 def CreateStorySet(self, options): |
| 138 # We want it to wait for 30 seconds to be comparable to legacy power tests. | 145 # We want it to wait for 30 seconds to be comparable to legacy power tests. |
| 139 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) | 146 return page_sets.IdleAfterLoadingStories(wait_in_seconds=30) |
| 140 | 147 |
| 141 @classmethod | 148 @classmethod |
| 142 def Name(cls): | 149 def Name(cls): |
| 143 return 'battor.steady_state' | 150 return 'battor.steady_state' |
| OLD | NEW |