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

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

Issue 2764663002: Fix desktop.memory measurement to emit memory-infra dumps. (Closed)
Patch Set: Created 3 years, 9 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/page_sets/trivial_sites.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 16 matching lines...) Expand all
27 is part of chrome tracing, and extracts it using timeline-based measurements. 27 is part of chrome tracing, and extracts it using timeline-based measurements.
28 """ 28 """
29 29
30 def CreateTimelineBasedMeasurementOptions(self): 30 def CreateTimelineBasedMeasurementOptions(self):
31 # Enable only memory-infra, to get memory dumps, and blink.console, to get 31 # Enable only memory-infra, to get memory dumps, and blink.console, to get
32 # the timeline markers used for mapping threads to tabs. 32 # the timeline markers used for mapping threads to tabs.
33 trace_memory = chrome_trace_category_filter.ChromeTraceCategoryFilter( 33 trace_memory = chrome_trace_category_filter.ChromeTraceCategoryFilter(
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
Primiano Tucci (use gerrit) 2017/03/21 15:33:06 isn't this going to lose graphics memtrack coverag
nednguyen 2017/03/21 15:35:18 Yeah, this should be removed for desktop memory be
perezju 2017/03/21 15:48:34 This should not be removed at all. It is needed fo
erikchen 2017/03/21 17:11:34 whoops, I wanted to only remove this for desktop.
38 tbm_options.SetTimelineBasedMetrics(['memoryMetric']) 37 tbm_options.SetTimelineBasedMetrics(['memoryMetric'])
39 # Setting an empty memory dump config disables periodic dumps. 38 # Setting an empty memory dump config disables periodic dumps.
40 tbm_options.config.chrome_trace_config.SetMemoryDumpConfig( 39 tbm_options.config.chrome_trace_config.SetMemoryDumpConfig(
41 chrome_trace_config.MemoryDumpConfig()) 40 chrome_trace_config.MemoryDumpConfig())
42 return tbm_options 41 return tbm_options
43 42
44 def SetExtraBrowserOptions(self, options): 43 def SetExtraBrowserOptions(self, options):
45 # Just before we measure memory we flush the system caches 44 # Just before we measure memory we flush the system caches
46 # unfortunately this doesn't immediately take effect, instead 45 # unfortunately this doesn't immediately take effect, instead
47 # the next page run is effected. Due to this the first page run 46 # the next page run is effected. Due to this the first page run
48 # has anomalous results. This option causes us to flush caches 47 # has anomalous results. This option causes us to flush caches
49 # each time before Chrome starts so we effect even the first page 48 # each time before Chrome starts so we effect even the first page
50 # - avoiding the bug. 49 # - avoiding the bug.
51 options.clear_sytem_cache_for_browser_and_profile_on_start = True 50 options.clear_sytem_cache_for_browser_and_profile_on_start = True
52 51
53 52
54 @benchmark.Enabled('mac') 53 @benchmark.Enabled('mac')
55 @benchmark.Enabled('win') 54 @benchmark.Enabled('win')
56 @benchmark.Owner(emails=['erikchen@chromium.org']) 55 @benchmark.Owner(emails=['erikchen@chromium.org'])
57 class MemoryBenchmarkTrivialSitesDesktop(_MemoryInfra): 56 class MemoryBenchmarkTrivialSitesDesktop(_MemoryInfra):
58 """Measure memory usage on trivial sites.""" 57 """Measure memory usage on trivial sites."""
59 page_set = page_sets.TrivialSitesStorySet
60 options = {'pageset_repeat': 5} 58 options = {'pageset_repeat': 5}
61 59
60 def CreateStorySet(self, options):
61 return page_sets.TrivialSitesStorySet(wait_in_seconds=0,
62 measure_memory=True)
63
62 @classmethod 64 @classmethod
63 def Name(cls): 65 def Name(cls):
64 return 'memory.desktop' 66 return 'memory.desktop'
65 67
66 @classmethod 68 @classmethod
67 def ShouldTearDownStateAfterEachStoryRun(cls): 69 def ShouldTearDownStateAfterEachStoryRun(cls):
68 return True 70 return True
69 71
70 @classmethod 72 @classmethod
71 def ValueCanBeAddedPredicate(cls, value, is_first_result): 73 def ValueCanBeAddedPredicate(cls, value, is_first_result):
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 of long running idle Gmail page """ 271 of long running idle Gmail page """
270 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 272 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
271 273
272 @classmethod 274 @classmethod
273 def Name(cls): 275 def Name(cls):
274 return 'memory.long_running_idle_gmail_background_tbmv2' 276 return 'memory.long_running_idle_gmail_background_tbmv2'
275 277
276 @classmethod 278 @classmethod
277 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 279 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530
278 return cls.IsSvelte(possible_browser) 280 return cls.IsSvelte(possible_browser)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/trivial_sites.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698