| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 benchmarks import page_cycler_v2 | 7 from benchmarks import page_cycler_v2 |
| 8 | 8 |
| 9 from core import perf_benchmark | 9 from core import perf_benchmark |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 options.SetTimelineBasedMetrics(['memoryMetric']) | 98 options.SetTimelineBasedMetrics(['memoryMetric']) |
| 99 # Setting an empty memory dump config disables periodic dumps. | 99 # Setting an empty memory dump config disables periodic dumps. |
| 100 options.config.chrome_trace_config.SetMemoryDumpConfig( | 100 options.config.chrome_trace_config.SetMemoryDumpConfig( |
| 101 chrome_trace_config.MemoryDumpConfig()) | 101 chrome_trace_config.MemoryDumpConfig()) |
| 102 return options | 102 return options |
| 103 | 103 |
| 104 def CreateStorySet(self, options): | 104 def CreateStorySet(self, options): |
| 105 return page_sets.SystemHealthStorySet(platform=self.PLATFORM, | 105 return page_sets.SystemHealthStorySet(platform=self.PLATFORM, |
| 106 take_memory_measurement=True) | 106 take_memory_measurement=True) |
| 107 | 107 |
| 108 def SetExtraBrowserOptions(self, options): | |
| 109 # Just before we measure memory we flush the system caches | |
| 110 # unfortunately this doesn't immediately take effect, instead | |
| 111 # the next story run is effected. Due to this the first story run | |
| 112 # has anomalous results. This option causes us to flush caches | |
| 113 # each time before Chrome starts so we effect even the first story | |
| 114 # - avoiding the bug. | |
| 115 options.clear_sytem_cache_for_browser_and_profile_on_start = True | |
| 116 | |
| 117 @classmethod | 108 @classmethod |
| 118 def ShouldTearDownStateAfterEachStoryRun(cls): | 109 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 119 return True | 110 return True |
| 120 | 111 |
| 121 @classmethod | 112 @classmethod |
| 122 def Name(cls): | 113 def Name(cls): |
| 123 return 'system_health.memory_%s' % cls.PLATFORM | 114 return 'system_health.memory_%s' % cls.PLATFORM |
| 124 | 115 |
| 125 @classmethod | 116 @classmethod |
| 126 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 117 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 and load a blank page with multiprocess enabled. | 185 and load a blank page with multiprocess enabled. |
| 195 """ | 186 """ |
| 196 | 187 |
| 197 def SetExtraBrowserOptions(self, options): | 188 def SetExtraBrowserOptions(self, options): |
| 198 options.AppendExtraBrowserArgs( | 189 options.AppendExtraBrowserArgs( |
| 199 ['--webview-sandboxed-renderer']) | 190 ['--webview-sandboxed-renderer']) |
| 200 | 191 |
| 201 @classmethod | 192 @classmethod |
| 202 def Name(cls): | 193 def Name(cls): |
| 203 return 'system_health.webview_startup_multiprocess' | 194 return 'system_health.webview_startup_multiprocess' |
| OLD | NEW |