| 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 benchmarks import page_cycler_v2 | 7 from benchmarks import page_cycler_v2 |
| 8 | 8 |
| 9 from core import perf_benchmark | 9 from core import perf_benchmark |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class DesktopCommonSystemHealth(_CommonSystemHealthBenchmark): | 58 class DesktopCommonSystemHealth(_CommonSystemHealthBenchmark): |
| 59 """Desktop Chrome Energy System Health Benchmark.""" | 59 """Desktop Chrome Energy System Health Benchmark.""" |
| 60 PLATFORM = 'desktop' | 60 PLATFORM = 'desktop' |
| 61 | 61 |
| 62 @classmethod | 62 @classmethod |
| 63 def ShouldDisable(cls, possible_browser): | 63 def ShouldDisable(cls, possible_browser): |
| 64 # http://crbug.com/624355 (reference builds). | 64 # http://crbug.com/624355 (reference builds). |
| 65 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or | 65 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or |
| 66 possible_browser.browser_type == 'reference') | 66 possible_browser.browser_type == 'reference') |
| 67 | 67 |
| 68 | 68 @benchmark.Enabled('android') |
| 69 class MobileCommonSystemHealth(_CommonSystemHealthBenchmark): | 69 class MobileCommonSystemHealth(_CommonSystemHealthBenchmark): |
| 70 """Mobile Chrome Energy System Health Benchmark.""" | 70 """Mobile Chrome Energy System Health Benchmark.""" |
| 71 PLATFORM = 'mobile' | 71 PLATFORM = 'mobile' |
| 72 | 72 |
| 73 @classmethod | |
| 74 def ShouldDisable(cls, possible_browser): | |
| 75 # http://crbug.com/612144 | |
| 76 if (possible_browser.browser_type == 'reference' and | |
| 77 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): | |
| 78 return True | |
| 79 | |
| 80 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' | |
| 81 | |
| 82 | |
| 83 class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): | 73 class _MemorySystemHealthBenchmark(perf_benchmark.PerfBenchmark): |
| 84 """Chrome Memory System Health Benchmark. | 74 """Chrome Memory System Health Benchmark. |
| 85 | 75 |
| 86 This test suite is run separately from the common one due to the high overhead | 76 This test suite is run separately from the common one due to the high overhead |
| 87 of memory tracing. | 77 of memory tracing. |
| 88 | 78 |
| 89 https://goo.gl/Jek2NL. | 79 https://goo.gl/Jek2NL. |
| 90 """ | 80 """ |
| 91 options = {'pageset_repeat': 3} | 81 options = {'pageset_repeat': 3} |
| 92 | 82 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 """Desktop Chrome Memory System Health Benchmark.""" | 114 """Desktop Chrome Memory System Health Benchmark.""" |
| 125 PLATFORM = 'desktop' | 115 PLATFORM = 'desktop' |
| 126 | 116 |
| 127 @classmethod | 117 @classmethod |
| 128 def ShouldDisable(cls, possible_browser): | 118 def ShouldDisable(cls, possible_browser): |
| 129 # http://crbug.com/624355 (reference builds). | 119 # http://crbug.com/624355 (reference builds). |
| 130 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or | 120 return (possible_browser.platform.GetDeviceTypeName() != 'Desktop' or |
| 131 possible_browser.browser_type == 'reference') | 121 possible_browser.browser_type == 'reference') |
| 132 | 122 |
| 133 | 123 |
| 124 @benchmark.Enabled('android') |
| 134 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): | 125 class MobileMemorySystemHealth(_MemorySystemHealthBenchmark): |
| 135 """Mobile Chrome Memory System Health Benchmark.""" | 126 """Mobile Chrome Memory System Health Benchmark.""" |
| 136 PLATFORM = 'mobile' | 127 PLATFORM = 'mobile' |
| 137 | 128 |
| 138 @classmethod | |
| 139 def ShouldDisable(cls, possible_browser): | |
| 140 # http://crbug.com/612144 | |
| 141 if (possible_browser.browser_type == 'reference' and | |
| 142 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): | |
| 143 return True | |
| 144 | |
| 145 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' | |
| 146 | |
| 147 def SetExtraBrowserOptions(self, options): | 129 def SetExtraBrowserOptions(self, options): |
| 148 # Just before we measure memory we flush the system caches | 130 # Just before we measure memory we flush the system caches |
| 149 # unfortunately this doesn't immediately take effect, instead | 131 # unfortunately this doesn't immediately take effect, instead |
| 150 # the next story run is effected. Due to this the first story run | 132 # the next story run is effected. Due to this the first story run |
| 151 # has anomalous results. This option causes us to flush caches | 133 # has anomalous results. This option causes us to flush caches |
| 152 # each time before Chrome starts so we effect even the first story | 134 # each time before Chrome starts so we effect even the first story |
| 153 # - avoiding the bug. | 135 # - avoiding the bug. |
| 154 options.clear_sytem_cache_for_browser_and_profile_on_start = True | 136 options.clear_sytem_cache_for_browser_and_profile_on_start = True |
| 155 | 137 |
| 156 | 138 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 and load a blank page with multiprocess enabled. | 176 and load a blank page with multiprocess enabled. |
| 195 """ | 177 """ |
| 196 | 178 |
| 197 def SetExtraBrowserOptions(self, options): | 179 def SetExtraBrowserOptions(self, options): |
| 198 options.AppendExtraBrowserArgs( | 180 options.AppendExtraBrowserArgs( |
| 199 ['--webview-sandboxed-renderer']) | 181 ['--webview-sandboxed-renderer']) |
| 200 | 182 |
| 201 @classmethod | 183 @classmethod |
| 202 def Name(cls): | 184 def Name(cls): |
| 203 return 'system_health.webview_startup_multiprocess' | 185 return 'system_health.webview_startup_multiprocess' |
| OLD | NEW |