Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: tools/perf/benchmarks/system_health.py

Issue 2589173004: Stop bad results on first memory benchmark run (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/benchmarks/memory.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
108 @classmethod 117 @classmethod
109 def ShouldTearDownStateAfterEachStoryRun(cls): 118 def ShouldTearDownStateAfterEachStoryRun(cls):
110 return True 119 return True
111 120
112 @classmethod 121 @classmethod
113 def Name(cls): 122 def Name(cls):
114 return 'system_health.memory_%s' % cls.PLATFORM 123 return 'system_health.memory_%s' % cls.PLATFORM
115 124
116 @classmethod 125 @classmethod
117 def ValueCanBeAddedPredicate(cls, value, is_first_result): 126 def ValueCanBeAddedPredicate(cls, value, is_first_result):
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 and load a blank page with multiprocess enabled. 194 and load a blank page with multiprocess enabled.
186 """ 195 """
187 196
188 def SetExtraBrowserOptions(self, options): 197 def SetExtraBrowserOptions(self, options):
189 options.AppendExtraBrowserArgs( 198 options.AppendExtraBrowserArgs(
190 ['--webview-sandboxed-renderer']) 199 ['--webview-sandboxed-renderer'])
191 200
192 @classmethod 201 @classmethod
193 def Name(cls): 202 def Name(cls):
194 return 'system_health.webview_startup_multiprocess' 203 return 'system_health.webview_startup_multiprocess'
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/memory.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698