| 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 re | 5 import re |
| 6 | 6 |
| 7 from core import perf_benchmark | 7 from core import perf_benchmark |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 from telemetry.timeline import tracing_category_filter | 9 from telemetry.timeline import tracing_category_filter |
| 10 from telemetry.web_perf import timeline_based_measurement | 10 from telemetry.web_perf import timeline_based_measurement |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 @classmethod | 85 @classmethod |
| 86 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 86 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 87 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 87 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 88 # is able to cope with the data load generated by TBMv2 metrics. | 88 # is able to cope with the data load generated by TBMv2 metrics. |
| 89 return not _IGNORED_STATS_RE.search(value.name) | 89 return not _IGNORED_STATS_RE.search(value.name) |
| 90 | 90 |
| 91 | 91 |
| 92 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): | 92 class DesktopMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 93 """Desktop Chrome Memory System Health Benchmark.""" | 93 """Desktop Chrome Memory System Health Benchmark.""" |
| 94 page_set = page_sets.DesktopMemorySystemHealthStorySet | 94 page_set = page_sets.DesktopSystemHealthStorySet |
| 95 | 95 |
| 96 @classmethod | 96 @classmethod |
| 97 def ShouldDisable(cls, possible_browser): | 97 def ShouldDisable(cls, possible_browser): |
| 98 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' | 98 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' |
| 99 | 99 |
| 100 | 100 |
| 101 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): | 101 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 102 """Mobile Chrome Memory System Health Benchmark.""" | 102 """Mobile Chrome Memory System Health Benchmark.""" |
| 103 page_set = page_sets.MobileMemorySystemHealthStorySet | 103 page_set = page_sets.MobileSystemHealthStorySet |
| 104 | 104 |
| 105 @classmethod | 105 @classmethod |
| 106 def ShouldDisable(cls, possible_browser): | 106 def ShouldDisable(cls, possible_browser): |
| 107 # http://crbug.com/612144 (reference on Nexus 5X). | 107 # http://crbug.com/612144 (reference on Nexus 5X). |
| 108 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( | 108 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' or ( |
| 109 possible_browser.browser_type == 'reference' and | 109 possible_browser.browser_type == 'reference' and |
| 110 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') | 110 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X') |
| 111 | 111 |
| 112 @benchmark.Enabled('android-webview') | 112 @benchmark.Enabled('android-webview') |
| 113 class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): | 113 class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| (...skipping 14 matching lines...) Expand all Loading... |
| 128 options.config.atrace_config.app_name = 'org.chromium.webview_shell' | 128 options.config.atrace_config.app_name = 'org.chromium.webview_shell' |
| 129 return options | 129 return options |
| 130 | 130 |
| 131 @classmethod | 131 @classmethod |
| 132 def ShouldTearDownStateAfterEachStoryRun(cls): | 132 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 133 return True | 133 return True |
| 134 | 134 |
| 135 @classmethod | 135 @classmethod |
| 136 def Name(cls): | 136 def Name(cls): |
| 137 return 'system_health.webview_startup' | 137 return 'system_health.webview_startup' |
| OLD | NEW |