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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 benchmarks (including the ones in this file) will switch to use it instead | 82 benchmarks (including the ones in this file) will switch to use it instead |
| 83 of the TBMv1 metric and this temporary benchmark will be removed. See | 83 of the TBMv1 metric and this temporary benchmark will be removed. See |
| 84 crbug.com/60361. | 84 crbug.com/60361. |
| 85 """ | 85 """ |
| 86 TBM_VERSION = 2 | 86 TBM_VERSION = 2 |
| 87 | 87 |
| 88 @classmethod | 88 @classmethod |
| 89 def Name(cls): | 89 def Name(cls): |
| 90 return 'memory.top_10_mobile_tbmv2' | 90 return 'memory.top_10_mobile_tbmv2' |
| 91 | 91 |
| 92 @classmethod | |
| 93 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 94 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | |
| 95 # is able to cope with the data load generated by TBMv2 metrics. | |
| 96 return value.name.endswith('_avg') | |
|
petrcermak
2016/05/24 10:23:52
Ned: Will this method also be applied to things li
perezju
2016/05/24 11:29:06
You're correct, this was throwing away dump counts
| |
| 97 | |
| 92 | 98 |
| 93 # Benchmark is disabled by default because it takes too long to run. | 99 # Benchmark is disabled by default because it takes too long to run. |
| 94 @benchmark.Disabled('all') | 100 @benchmark.Disabled('all') |
| 95 class DualBrowserBenchmark(_MemoryInfra): | 101 class DualBrowserBenchmark(_MemoryInfra): |
| 96 """Measures memory usage while interacting with two different browsers. | 102 """Measures memory usage while interacting with two different browsers. |
| 97 | 103 |
| 98 The user story involves going back and forth between doing Google searches | 104 The user story involves going back and forth between doing Google searches |
| 99 on a webview-based browser (a stand in for the Search app), and loading | 105 on a webview-based browser (a stand in for the Search app), and loading |
| 100 pages on a select browser. | 106 pages on a select browser. |
| 101 """ | 107 """ |
| 102 TBM_VERSION = 2 | 108 TBM_VERSION = 2 |
| 103 page_set = page_sets.DualBrowserStorySet | 109 page_set = page_sets.DualBrowserStorySet |
| 104 options = {'pageset_repeat': 5} | 110 options = {'pageset_repeat': 5} |
| 105 | 111 |
| 106 @classmethod | 112 @classmethod |
| 107 def Name(cls): | 113 def Name(cls): |
| 108 return 'memory.dual_browser_test' | 114 return 'memory.dual_browser_test' |
| 109 | 115 |
| 116 @classmethod | |
| 117 def ValueCanBeAddedPredicate(cls, value, is_first_result): | |
| 118 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | |
| 119 # is able to cope with the data load generated by TBMv2 metrics. | |
| 120 return value.name.endswith('_avg') | |
| 121 | |
| 110 | 122 |
| 111 # TODO(bashi): Workaround for http://crbug.com/532075 | 123 # TODO(bashi): Workaround for http://crbug.com/532075 |
| 112 # @benchmark.Enabled('android') shouldn't be needed. | 124 # @benchmark.Enabled('android') shouldn't be needed. |
| 113 @benchmark.Enabled('android') | 125 @benchmark.Enabled('android') |
| 114 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 126 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 115 """Timeline based benchmark for measuring memory consumption on mobile | 127 """Timeline based benchmark for measuring memory consumption on mobile |
| 116 sites on which blink's memory consumption is relatively high.""" | 128 sites on which blink's memory consumption is relatively high.""" |
| 117 | 129 |
| 118 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 130 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 119 | 131 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 | 177 |
| 166 @benchmark.Disabled('android-webview') # http://crbug.com/612210 | 178 @benchmark.Disabled('android-webview') # http://crbug.com/612210 |
| 167 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): | 179 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): |
| 168 """Use (recorded) real world web sites and measure memory consumption | 180 """Use (recorded) real world web sites and measure memory consumption |
| 169 of long running idle Gmail page """ | 181 of long running idle Gmail page """ |
| 170 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 182 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 171 | 183 |
| 172 @classmethod | 184 @classmethod |
| 173 def Name(cls): | 185 def Name(cls): |
| 174 return 'memory.long_running_idle_gmail_background_tbmv2' | 186 return 'memory.long_running_idle_gmail_background_tbmv2' |
| OLD | NEW |