| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 @classmethod | 146 @classmethod |
| 147 def Name(cls): | 147 def Name(cls): |
| 148 return 'memory.blink_memory_mobile' | 148 return 'memory.blink_memory_mobile' |
| 149 | 149 |
| 150 @classmethod | 150 @classmethod |
| 151 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 151 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 152 return bool(cls._RE_RENDERER_VALUES.match(value.name)) | 152 return bool(cls._RE_RENDERER_VALUES.match(value.name)) |
| 153 | 153 |
| 154 | 154 |
| 155 # Disabled on reference builds because they don't support the new | 155 # Disabled on reference builds because they don't support the new |
| 156 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. | |
| 157 @benchmark.Disabled('reference') | |
| 158 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | |
| 159 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" | |
| 160 | |
| 161 page_set = page_sets.MemoryInfraTop10MobilePageSet | |
| 162 | |
| 163 @classmethod | |
| 164 def Name(cls): | |
| 165 return 'memory.top_10_mobile' | |
| 166 | |
| 167 | |
| 168 # Disabled on reference builds because they don't support the new | |
| 169 # Tracing.requestMemoryDump DevTools API. | 156 # Tracing.requestMemoryDump DevTools API. |
| 170 # For 'reference' see http://crbug.com/540022. | 157 # For 'reference' see http://crbug.com/540022. |
| 171 # For 'android' see http://crbug.com/579546. | 158 # For 'android' see http://crbug.com/579546. |
| 172 @benchmark.Disabled('reference', 'android') | 159 @benchmark.Disabled('reference', 'android') |
| 173 class MemoryLongRunningIdleGmailTBM(_MemoryInfra): | 160 class MemoryLongRunningIdleGmailTBM(_MemoryInfra): |
| 174 """Use (recorded) real world web sites and measure memory consumption | 161 """Use (recorded) real world web sites and measure memory consumption |
| 175 of long running idle Gmail page """ | 162 of long running idle Gmail page """ |
| 176 page_set = page_sets.LongRunningIdleGmailPageSet | 163 page_set = page_sets.LongRunningIdleGmailPageSet |
| 177 | 164 |
| 178 def CreateTimelineBasedMeasurementOptions(self): | 165 def CreateTimelineBasedMeasurementOptions(self): |
| (...skipping 13 matching lines...) Expand all Loading... |
| 192 memory_timeline.MemoryTimelineMetric(), | 179 memory_timeline.MemoryTimelineMetric(), |
| 193 )) | 180 )) |
| 194 | 181 |
| 195 @classmethod | 182 @classmethod |
| 196 def Name(cls): | 183 def Name(cls): |
| 197 return 'memory.long_running_idle_gmail_tbm' | 184 return 'memory.long_running_idle_gmail_tbm' |
| 198 | 185 |
| 199 @classmethod | 186 @classmethod |
| 200 def ShouldTearDownStateAfterEachStoryRun(cls): | 187 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 201 return True | 188 return True |
| OLD | NEW |