| 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 chrome_trace_category_filter | 10 from telemetry.timeline import chrome_trace_category_filter |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which | 25 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which |
| 26 is part of chrome tracing, and extracts it using timeline-based measurements. | 26 is part of chrome tracing, and extracts it using timeline-based measurements. |
| 27 """ | 27 """ |
| 28 | 28 |
| 29 def SetExtraBrowserOptions(self, options): | 29 def SetExtraBrowserOptions(self, options): |
| 30 options.AppendExtraBrowserArgs([ | 30 options.AppendExtraBrowserArgs([ |
| 31 # TODO(perezju): Temporary workaround to disable periodic memory dumps. | 31 # TODO(perezju): Temporary workaround to disable periodic memory dumps. |
| 32 # See: http://crbug.com/513692 | 32 # See: http://crbug.com/513692 |
| 33 '--enable-memory-benchmarking', | 33 '--enable-memory-benchmarking', |
| 34 '--no-sandbox', |
| 35 '--purge-and-suspend-time=15', |
| 36 '--enable-heap-profiling=native', |
| 34 ]) | 37 ]) |
| 35 | 38 |
| 36 def CreateTimelineBasedMeasurementOptions(self): | 39 def CreateTimelineBasedMeasurementOptions(self): |
| 37 # Enable only memory-infra, to get memory dumps, and blink.console, to get | 40 # Enable only memory-infra, to get memory dumps, and blink.console, to get |
| 38 # the timeline markers used for mapping threads to tabs. | 41 # the timeline markers used for mapping threads to tabs. |
| 39 trace_memory = chrome_trace_category_filter.ChromeTraceCategoryFilter( | 42 trace_memory = chrome_trace_category_filter.ChromeTraceCategoryFilter( |
| 40 filter_string='-*,blink.console,disabled-by-default-memory-infra') | 43 filter_string='-*,blink.console,disabled-by-default-memory-infra') |
| 41 tbm_options = timeline_based_measurement.Options( | 44 tbm_options = timeline_based_measurement.Options( |
| 42 overhead_level=trace_memory) | 45 overhead_level=trace_memory) |
| 43 tbm_options.config.enable_android_graphics_memtrack = True | 46 tbm_options.config.enable_android_graphics_memtrack = True |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 of long running idle Gmail page """ | 240 of long running idle Gmail page """ |
| 238 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 241 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 239 | 242 |
| 240 @classmethod | 243 @classmethod |
| 241 def Name(cls): | 244 def Name(cls): |
| 242 return 'memory.long_running_idle_gmail_background_tbmv2' | 245 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 243 | 246 |
| 244 @classmethod | 247 @classmethod |
| 245 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 248 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 246 return cls.IsSvelte(possible_browser) | 249 return cls.IsSvelte(possible_browser) |
| OLD | NEW |