| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 # @benchmark.Enabled('android') shouldn't be needed. | 136 # @benchmark.Enabled('android') shouldn't be needed. |
| 137 @benchmark.Enabled('android') | 137 @benchmark.Enabled('android') |
| 138 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 138 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 139 """Timeline based benchmark for measuring memory consumption on mobile | 139 """Timeline based benchmark for measuring memory consumption on mobile |
| 140 sites on which blink's memory consumption is relatively high.""" | 140 sites on which blink's memory consumption is relatively high.""" |
| 141 | 141 |
| 142 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 142 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') |
| 143 | 143 |
| 144 page_set = page_sets.BlinkMemoryMobilePageSet | 144 page_set = page_sets.BlinkMemoryMobilePageSet |
| 145 | 145 |
| 146 def SetExtraBrowserOptions(self, options): | |
| 147 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( | |
| 148 options) | |
| 149 options.AppendExtraBrowserArgs([ | |
| 150 # Ignore certs errors because record_wpr cannot handle certs correctly | |
| 151 # in some cases (e.g. WordPress). | |
| 152 '--ignore-certificate-errors', | |
| 153 ]) | |
| 154 | |
| 155 @classmethod | 146 @classmethod |
| 156 def Name(cls): | 147 def Name(cls): |
| 157 return 'memory.blink_memory_mobile' | 148 return 'memory.blink_memory_mobile' |
| 158 | 149 |
| 159 @classmethod | 150 @classmethod |
| 160 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 151 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 161 return bool(cls._RE_RENDERER_VALUES.match(value.name)) | 152 return bool(cls._RE_RENDERER_VALUES.match(value.name)) |
| 162 | 153 |
| 163 | 154 |
| 164 class _MemoryV8Benchmark(_MemoryInfra): | 155 class _MemoryV8Benchmark(_MemoryInfra): |
| (...skipping 24 matching lines...) Expand all Loading... |
| 189 | 180 |
| 190 @benchmark.Enabled('has tabs') # http://crbug.com/612210 | 181 @benchmark.Enabled('has tabs') # http://crbug.com/612210 |
| 191 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): | 182 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): |
| 192 """Use (recorded) real world web sites and measure memory consumption | 183 """Use (recorded) real world web sites and measure memory consumption |
| 193 of long running idle Gmail page """ | 184 of long running idle Gmail page """ |
| 194 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 185 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 195 | 186 |
| 196 @classmethod | 187 @classmethod |
| 197 def Name(cls): | 188 def Name(cls): |
| 198 return 'memory.long_running_idle_gmail_background_tbmv2' | 189 return 'memory.long_running_idle_gmail_background_tbmv2' |
| OLD | NEW |