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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 # TODO(bashi): Workaround for http://crbug.com/532075 | 142 # TODO(bashi): Workaround for http://crbug.com/532075 |
| 143 # @benchmark.Enabled('android') shouldn't be needed. | 143 # @benchmark.Enabled('android') shouldn't be needed. |
| 144 @benchmark.Enabled('android') | 144 @benchmark.Enabled('android') |
| 145 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): | 145 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): |
| 146 """Timeline based benchmark for measuring memory consumption on mobile | 146 """Timeline based benchmark for measuring memory consumption on mobile |
| 147 sites on which blink's memory consumption is relatively high.""" | 147 sites on which blink's memory consumption is relatively high. |
| 148 | 148 """ |
| 149 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') | 149 TBM_VERSION = 2 |
|
nednguyen
2016/06/23 05:26:03
Why do we need this?
bashi
2016/06/23 05:29:24
The base class (_MemoryInfra.CreateTimelineBasedMe
nednguyen
2016/06/23 05:38:17
Acknowledged.
| |
| 150 | 150 |
| 151 page_set = page_sets.BlinkMemoryMobilePageSet | 151 page_set = page_sets.BlinkMemoryMobilePageSet |
| 152 | 152 |
| 153 def SetExtraBrowserOptions(self, options): | 153 def SetExtraBrowserOptions(self, options): |
| 154 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( | 154 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( |
| 155 options) | 155 options) |
| 156 options.AppendExtraBrowserArgs([ | 156 options.AppendExtraBrowserArgs([ |
| 157 # Ignore certs errors because record_wpr cannot handle certs correctly | 157 # Ignore certs errors because record_wpr cannot handle certs correctly |
| 158 # in some cases (e.g. WordPress). | 158 # in some cases (e.g. WordPress). |
| 159 '--ignore-certificate-errors', | 159 '--ignore-certificate-errors', |
| 160 ]) | 160 ]) |
| 161 | 161 |
| 162 @classmethod | 162 @classmethod |
| 163 def Name(cls): | 163 def Name(cls): |
| 164 return 'memory.blink_memory_mobile' | 164 return 'memory.blink_memory_mobile' |
| 165 | 165 |
| 166 @classmethod | 166 @classmethod |
| 167 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 167 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 168 return bool(cls._RE_RENDERER_VALUES.match(value.name)) | 168 return (not _IGNORED_STATS_RE.search(value.name) and |
| 169 'renderer_process' in value.name) | |
|
petrcermak
2016/06/23 09:29:13
strictly speaking it should be 'renderer_processes
bashi
2016/06/23 23:01:18
Done.
| |
| 169 | 170 |
| 170 | 171 |
| 171 class _MemoryV8Benchmark(_MemoryInfra): | 172 class _MemoryV8Benchmark(_MemoryInfra): |
| 172 | 173 |
| 173 # Report only V8-specific and overall renderer memory values. Note that | 174 # Report only V8-specific and overall renderer memory values. Note that |
| 174 # detailed values reported by the OS (such as native heap) are excluded. | 175 # detailed values reported by the OS (such as native heap) are excluded. |
| 175 _V8_AND_OVERALL_MEMORY_RE = re.compile( | 176 _V8_AND_OVERALL_MEMORY_RE = re.compile( |
| 176 r'renderer_processes:' | 177 r'renderer_processes:' |
| 177 r'(reported_by_chrome:v8|reported_by_os:system_memory:[^:]+$)') | 178 r'(reported_by_chrome:v8|reported_by_os:system_memory:[^:]+$)') |
| 178 | 179 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 of long running idle Gmail page """ | 219 of long running idle Gmail page """ |
| 219 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 220 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 220 | 221 |
| 221 @classmethod | 222 @classmethod |
| 222 def Name(cls): | 223 def Name(cls): |
| 223 return 'memory.long_running_idle_gmail_background_tbmv2' | 224 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 224 | 225 |
| 225 @classmethod | 226 @classmethod |
| 226 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 227 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 227 return cls.IsSvelte(possible_browser) | 228 return cls.IsSvelte(possible_browser) |
| OLD | NEW |