| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 # Benchmark is disabled by default because it takes too long to run. | 105 # Benchmark is disabled by default because it takes too long to run. |
| 106 @benchmark.Disabled('all') | 106 @benchmark.Disabled('all') |
| 107 class DualBrowserBenchmark(_MemoryInfra): | 107 class DualBrowserBenchmark(_MemoryInfra): |
| 108 """Measures memory usage while interacting with two different browsers. | 108 """Measures memory usage while interacting with two different browsers. |
| 109 | 109 |
| 110 The user story involves going back and forth between doing Google searches | 110 The user story involves going back and forth between doing Google searches |
| 111 on a webview-based browser (a stand in for the Search app), and loading | 111 on a webview-based browser (a stand in for the Search app), and loading |
| 112 pages on a select browser. | 112 pages on a select browser. |
| 113 """ | 113 """ |
| 114 TBM_VERSION = 2 |
| 114 page_set = page_sets.DualBrowserStorySet | 115 page_set = page_sets.DualBrowserStorySet |
| 115 options = {'pageset_repeat': 5} | 116 options = {'pageset_repeat': 5} |
| 116 | 117 |
| 117 @classmethod | 118 @classmethod |
| 118 def Name(cls): | 119 def Name(cls): |
| 119 return 'memory.dual_browser_test' | 120 return 'memory.dual_browser_test' |
| 120 | 121 |
| 121 def SetupBenchmarkDefaultTraceRerunOptions(self, tbm_options): | |
| 122 # This is a TBMv2 benchmark. | |
| 123 tbm_options.SetTimelineBasedMetric('memoryMetric') | |
| 124 | |
| 125 | 122 |
| 126 # TODO(bashi): Workaround for http://crbug.com/532075 | 123 # TODO(bashi): Workaround for http://crbug.com/532075 |
| 127 # @benchmark.Enabled('android') shouldn't be needed. | 124 # @benchmark.Enabled('android') shouldn't be needed. |
| 128 @benchmark.Enabled('android') | 125 @benchmark.Enabled('android') |
| 129 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 126 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 130 """Timeline based benchmark for measuring memory consumption on mobile | 127 """Timeline based benchmark for measuring memory consumption on mobile |
| 131 sites on which blink's memory consumption is relatively high.""" | 128 sites on which blink's memory consumption is relatively high.""" |
| 132 | 129 |
| 133 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 130 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 134 | 131 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 memory_timeline.MemoryTimelineMetric(), | 176 memory_timeline.MemoryTimelineMetric(), |
| 180 )) | 177 )) |
| 181 | 178 |
| 182 @classmethod | 179 @classmethod |
| 183 def Name(cls): | 180 def Name(cls): |
| 184 return 'memory.long_running_idle_gmail_tbm' | 181 return 'memory.long_running_idle_gmail_tbm' |
| 185 | 182 |
| 186 @classmethod | 183 @classmethod |
| 187 def ShouldTearDownStateAfterEachStoryRun(cls): | 184 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 188 return True | 185 return True |
| OLD | NEW |