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

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

Issue 2658583005: [system-health] Only flush system cache on mobile (Closed)
Patch Set: 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 | « no previous file | 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
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 19 matching lines...) Expand all
146 137
147 @classmethod 138 @classmethod
148 def ShouldDisable(cls, possible_browser): 139 def ShouldDisable(cls, possible_browser):
149 # http://crbug.com/612144 140 # http://crbug.com/612144
150 if (possible_browser.browser_type == 'reference' and 141 if (possible_browser.browser_type == 'reference' and
151 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'): 142 possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'):
152 return True 143 return True
153 144
154 return possible_browser.platform.GetDeviceTypeName() == 'Desktop' 145 return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
155 146
147 def SetExtraBrowserOptions(self, options):
148 # Just before we measure memory we flush the system caches
149 # unfortunately this doesn't immediately take effect, instead
150 # the next story run is effected. Due to this the first story run
151 # has anomalous results. This option causes us to flush caches
152 # each time before Chrome starts so we effect even the first story
153 # - avoiding the bug.
154 options.clear_sytem_cache_for_browser_and_profile_on_start = True
155
156 156
157 @benchmark.Enabled('android-webview') 157 @benchmark.Enabled('android-webview')
158 class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): 158 class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
159 """Webview startup time benchmark 159 """Webview startup time benchmark
160 160
161 Benchmark that measures how long WebView takes to start up 161 Benchmark that measures how long WebView takes to start up
162 and load a blank page. Since thie metric only requires the trace 162 and load a blank page. Since thie metric only requires the trace
163 markers recorded in atrace, Chrome tracing is not enabled for this 163 markers recorded in atrace, Chrome tracing is not enabled for this
164 benchmark. 164 benchmark.
165 """ 165 """
(...skipping 28 matching lines...) Expand all
194 and load a blank page with multiprocess enabled. 194 and load a blank page with multiprocess enabled.
195 """ 195 """
196 196
197 def SetExtraBrowserOptions(self, options): 197 def SetExtraBrowserOptions(self, options):
198 options.AppendExtraBrowserArgs( 198 options.AppendExtraBrowserArgs(
199 ['--webview-sandboxed-renderer']) 199 ['--webview-sandboxed-renderer'])
200 200
201 @classmethod 201 @classmethod
202 def Name(cls): 202 def Name(cls):
203 return 'system_health.webview_startup_multiprocess' 203 return 'system_health.webview_startup_multiprocess'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698