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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 def CreateTimelineBasedMeasurementOptions(self): | 156 def CreateTimelineBasedMeasurementOptions(self): |
157 v8_categories = [ | 157 v8_categories = [ |
158 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] | 158 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console'] |
159 memory_categories = ['blink.console', 'disabled-by-default-memory-infra'] | 159 memory_categories = ['blink.console', 'disabled-by-default-memory-infra'] |
160 category_filter = tracing_category_filter.TracingCategoryFilter( | 160 category_filter = tracing_category_filter.TracingCategoryFilter( |
161 ','.join(['-*'] + v8_categories + memory_categories)) | 161 ','.join(['-*'] + v8_categories + memory_categories)) |
162 options = timeline_based_measurement.Options(category_filter) | 162 options = timeline_based_measurement.Options(category_filter) |
163 options.SetTimelineBasedMetric('v8AndMemoryMetrics') | 163 options.SetTimelineBasedMetric('v8AndMemoryMetrics') |
164 return options | 164 return options |
165 | 165 |
| 166 @classmethod |
| 167 def ValueCanBeAddedPredicate(cls, value, _): |
| 168 if 'memory:chrome' in value.name: |
| 169 return ('renderer:subsystem:v8' in value.name or |
| 170 'renderer:vmstats:overall' in value.name) |
| 171 return 'v8' in value.name |
| 172 |
166 | 173 |
167 class MemoryLongRunningIdleGmail(_MemoryV8Benchmark): | 174 class MemoryLongRunningIdleGmail(_MemoryV8Benchmark): |
168 """Use (recorded) real world web sites and measure memory consumption | 175 """Use (recorded) real world web sites and measure memory consumption |
169 of long running idle Gmail page """ | 176 of long running idle Gmail page """ |
170 page_set = page_sets.LongRunningIdleGmailPageSet | 177 page_set = page_sets.LongRunningIdleGmailPageSet |
171 | 178 |
172 @classmethod | 179 @classmethod |
173 def Name(cls): | 180 def Name(cls): |
174 return 'memory.long_running_idle_gmail_tbmv2' | 181 return 'memory.long_running_idle_gmail_tbmv2' |
175 | 182 |
176 @classmethod | 183 @classmethod |
177 def ShouldDisable(cls, possible_browser): | 184 def ShouldDisable(cls, possible_browser): |
178 return cls.IsSvelte(possible_browser) # http://crbug.com/611167 | 185 return cls.IsSvelte(possible_browser) # http://crbug.com/611167 |
179 | 186 |
180 | 187 |
181 @benchmark.Enabled('has tabs') # http://crbug.com/612210 | 188 @benchmark.Enabled('has tabs') # http://crbug.com/612210 |
182 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): | 189 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): |
183 """Use (recorded) real world web sites and measure memory consumption | 190 """Use (recorded) real world web sites and measure memory consumption |
184 of long running idle Gmail page """ | 191 of long running idle Gmail page """ |
185 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 192 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
186 | 193 |
187 @classmethod | 194 @classmethod |
188 def Name(cls): | 195 def Name(cls): |
189 return 'memory.long_running_idle_gmail_background_tbmv2' | 196 return 'memory.long_running_idle_gmail_background_tbmv2' |
190 | 197 |
191 @classmethod | 198 @classmethod |
192 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 199 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
193 return cls.IsSvelte(possible_browser) | 200 return cls.IsSvelte(possible_browser) |
OLD | NEW |