Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 | 8 |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.timeline import tracing_category_filter | 10 from telemetry.timeline import tracing_category_filter |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 return not possible_browser.platform.CanLaunchApplication( | 108 return not possible_browser.platform.CanLaunchApplication( |
| 109 'com.google.android.deskclock') | 109 'com.google.android.deskclock') |
| 110 | 110 |
| 111 @classmethod | 111 @classmethod |
| 112 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 112 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 113 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 113 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 114 # is able to cope with the data load generated by TBMv2 metrics. | 114 # is able to cope with the data load generated by TBMv2 metrics. |
| 115 return not _IGNORED_STATS_RE.search(value.name) | 115 return not _IGNORED_STATS_RE.search(value.name) |
| 116 | 116 |
| 117 | 117 |
| 118 # Benchmark is disabled by default because it takes too long to run. | 118 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. |
| 119 @benchmark.Disabled('all') | 119 @benchmark.Disabled('all') |
| 120 class DualBrowserBenchmark(_MemoryInfra): | 120 class DualBrowserBenchmark(_MemoryInfra): |
| 121 """Measures memory usage while interacting with two different browsers. | 121 """Measures memory usage while interacting with two different browsers. |
| 122 | 122 |
| 123 The user story involves going back and forth between doing Google searches | 123 The user story involves going back and forth between doing Google searches |
| 124 on a webview-based browser (a stand in for the Search app), and loading | 124 on a webview-based browser (a stand in for the Search app), and loading |
| 125 pages on a select browser. | 125 pages on a select browser. |
| 126 """ | 126 """ |
| 127 TBM_VERSION = 2 | 127 TBM_VERSION = 2 |
| 128 page_set = page_sets.DualBrowserStorySet | 128 page_set = page_sets.DualBrowserStorySet |
| 129 options = {'pageset_repeat': 5} | 129 options = {'pageset_repeat': 5} |
| 130 | 130 |
| 131 @classmethod | 131 @classmethod |
| 132 def Name(cls): | 132 def Name(cls): |
| 133 return 'memory.dual_browser_test' | 133 return 'memory.dual_browser_test' |
| 134 | 134 |
| 135 @classmethod | 135 @classmethod |
| 136 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 136 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 137 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 137 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 138 # is able to cope with the data load generated by TBMv2 metrics. | 138 # is able to cope with the data load generated by TBMv2 metrics. |
| 139 return not _IGNORED_STATS_RE.search(value.name) | 139 return not _IGNORED_STATS_RE.search(value.name) |
| 140 | 140 |
| 141 | 141 |
| 142 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. | |
| 143 @benchmark.Disabled('all') | |
| 144 class LongRunningDualBrowserBenchmark(_MemoryInfra): | |
| 145 """Measures memory during prolonged usage of alternating browsers. | |
| 146 | |
| 147 Same as memory.dual_browser_test, but the test is run for 60 iterations | |
| 148 and the browser is *not* restarted between page set repeats. | |
| 149 """ | |
| 150 TBM_VERSION = 2 | |
| 151 page_set = page_sets.DualBrowserStorySet | |
| 152 options = {'pageset_repeat': 60} | |
| 153 | |
| 154 @classmethod | |
| 155 def Name(cls): | |
| 156 return 'memory.long_running_dual_browser_test' | |
| 157 | |
| 158 @classmethod | |
| 159 def ShouldTearDownStateAfterEachStorySetRun(cls): | |
| 160 return False | |
|
perezju
2016/06/24 10:11:08
Note this method does not exist, yet. Will be adde
| |
| 161 | |
| 162 @classmethod | |
| 163 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 164 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | |
| 165 # is able to cope with the data load generated by TBMv2 metrics. | |
| 166 return not _IGNORED_STATS_RE.search(value.name) | |
| 167 | |
| 168 | |
| 142 # TODO(bashi): Workaround for http://crbug.com/532075 | 169 # TODO(bashi): Workaround for http://crbug.com/532075 |
| 143 # @benchmark.Enabled('android') shouldn't be needed. | 170 # @benchmark.Enabled('android') shouldn't be needed. |
| 144 @benchmark.Enabled('android') | 171 @benchmark.Enabled('android') |
| 145 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 172 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 146 """Timeline based benchmark for measuring memory consumption on mobile | 173 """Timeline based benchmark for measuring memory consumption on mobile |
| 147 sites on which blink's memory consumption is relatively high.""" | 174 sites on which blink's memory consumption is relatively high.""" |
| 148 | 175 |
| 149 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 176 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 150 | 177 |
| 151 page_set = page_sets.BlinkMemoryMobilePageSet | 178 page_set = page_sets.BlinkMemoryMobilePageSet |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 of long running idle Gmail page """ | 245 of long running idle Gmail page """ |
| 219 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 246 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 220 | 247 |
| 221 @classmethod | 248 @classmethod |
| 222 def Name(cls): | 249 def Name(cls): |
| 223 return 'memory.long_running_idle_gmail_background_tbmv2' | 250 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 224 | 251 |
| 225 @classmethod | 252 @classmethod |
| 226 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 253 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 227 return cls.IsSvelte(possible_browser) | 254 return cls.IsSvelte(possible_browser) |
| OLD | NEW |