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

Side by Side Diff: tools/perf/benchmarks/memory.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 | « no previous file | tools/perf/benchmarks/system_health.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 23 matching lines...) Expand all
34 filter_string='-*,blink.console,disabled-by-default-memory-infra') 34 filter_string='-*,blink.console,disabled-by-default-memory-infra')
35 tbm_options = timeline_based_measurement.Options( 35 tbm_options = timeline_based_measurement.Options(
36 overhead_level=trace_memory) 36 overhead_level=trace_memory)
37 tbm_options.config.enable_android_graphics_memtrack = True 37 tbm_options.config.enable_android_graphics_memtrack = True
38 tbm_options.SetTimelineBasedMetrics(['memoryMetric']) 38 tbm_options.SetTimelineBasedMetrics(['memoryMetric'])
39 # Setting an empty memory dump config disables periodic dumps. 39 # Setting an empty memory dump config disables periodic dumps.
40 tbm_options.config.chrome_trace_config.SetMemoryDumpConfig( 40 tbm_options.config.chrome_trace_config.SetMemoryDumpConfig(
41 chrome_trace_config.MemoryDumpConfig()) 41 chrome_trace_config.MemoryDumpConfig())
42 return tbm_options 42 return tbm_options
43 43
44 def SetExtraBrowserOptions(self, options):
45 # Just before we measure memory we flush the system caches
46 # unfortunately this doesn't immediately take effect, instead
47 # the next page run is effected. Due to this the first page run
48 # has anomalous results. This option causes us to flush caches
49 # each time before Chrome starts so we effect even the first page
50 # - avoiding the bug.
51 options.clear_sytem_cache_for_browser_and_profile_on_start = True
52
44 53
45 # TODO(bashi): Workaround for http://crbug.com/532075. 54 # TODO(bashi): Workaround for http://crbug.com/532075.
46 # @benchmark.Enabled('android') shouldn't be needed. 55 # @benchmark.Enabled('android') shouldn't be needed.
47 @benchmark.Enabled('android') 56 @benchmark.Enabled('android')
48 class MemoryBenchmarkTop10Mobile(_MemoryInfra): 57 class MemoryBenchmarkTop10Mobile(_MemoryInfra):
49 """Measure foreground/background memory on top 10 mobile page set. 58 """Measure foreground/background memory on top 10 mobile page set.
50 59
51 This metric provides memory measurements for the System Health Plan of 60 This metric provides memory measurements for the System Health Plan of
52 Chrome on Android. 61 Chrome on Android.
53 """ 62 """
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 of long running idle Gmail page """ 248 of long running idle Gmail page """
240 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 249 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
241 250
242 @classmethod 251 @classmethod
243 def Name(cls): 252 def Name(cls):
244 return 'memory.long_running_idle_gmail_background_tbmv2' 253 return 'memory.long_running_idle_gmail_background_tbmv2'
245 254
246 @classmethod 255 @classmethod
247 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 256 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530
248 return cls.IsSvelte(possible_browser) 257 return cls.IsSvelte(possible_browser)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/system_health.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698