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 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 return ('v8' in value.name or | |
| 169 'memory_chrome_renderer_vmstats_overall' in value.name) | |
|
petrcermak
2016/06/03 11:25:28
The value name is now "memory:chrome:renderer:vmst
petrcermak
2016/06/03 11:55:56
In that case, you might also want to change 'v8' t
petrcermak
2016/06/06 09:45:17
Ping on this comment.
| |
| 170 | |
| 166 | 171 |
| 167 class MemoryLongRunningIdleGmail(_MemoryV8Benchmark): | 172 class MemoryLongRunningIdleGmail(_MemoryV8Benchmark): |
| 168 """Use (recorded) real world web sites and measure memory consumption | 173 """Use (recorded) real world web sites and measure memory consumption |
| 169 of long running idle Gmail page """ | 174 of long running idle Gmail page """ |
| 170 page_set = page_sets.LongRunningIdleGmailPageSet | 175 page_set = page_sets.LongRunningIdleGmailPageSet |
| 171 | 176 |
| 172 @classmethod | 177 @classmethod |
| 173 def Name(cls): | 178 def Name(cls): |
| 174 return 'memory.long_running_idle_gmail_tbmv2' | 179 return 'memory.long_running_idle_gmail_tbmv2' |
| 175 | 180 |
| 176 @classmethod | 181 @classmethod |
| 177 def ShouldDisable(cls, possible_browser): | 182 def ShouldDisable(cls, possible_browser): |
| 178 return cls.IsSvelte(possible_browser) # http://crbug.com/611167 | 183 return cls.IsSvelte(possible_browser) # http://crbug.com/611167 |
| 179 | 184 |
| 180 | 185 |
| 181 @benchmark.Enabled('has tabs') # http://crbug.com/612210 | 186 @benchmark.Enabled('has tabs') # http://crbug.com/612210 |
| 182 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): | 187 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): |
| 183 """Use (recorded) real world web sites and measure memory consumption | 188 """Use (recorded) real world web sites and measure memory consumption |
| 184 of long running idle Gmail page """ | 189 of long running idle Gmail page """ |
| 185 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 190 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 186 | 191 |
| 187 @classmethod | 192 @classmethod |
| 188 def Name(cls): | 193 def Name(cls): |
| 189 return 'memory.long_running_idle_gmail_background_tbmv2' | 194 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 190 | 195 |
| 191 @classmethod | 196 @classmethod |
| 192 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 197 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 193 return cls.IsSvelte(possible_browser) | 198 return cls.IsSvelte(possible_browser) |
| OLD | NEW |