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

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

Issue 2005233002: [tools/perf] Only send _avg metrics for memory infra metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use a blacklist regex Created 4 years, 6 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 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 tracing_category_filter 10 from telemetry.timeline import tracing_category_filter
11 from telemetry.web_perf import timeline_based_measurement 11 from telemetry.web_perf import timeline_based_measurement
12 from telemetry.web_perf.metrics import memory_timeline 12 from telemetry.web_perf.metrics import memory_timeline
13 13
14 import page_sets 14 import page_sets
15 15
16 16
17 _IGNORED_STATS_RE = re.compile(r'_(std|count|max|min|sum|pct_\d{4}(_\d+)?)$')
petrcermak 2016/05/24 12:36:54 It might be worth saying something like "See tr.v.
perezju 2016/05/24 13:16:46 Done.
18
19
17 class _MemoryInfra(perf_benchmark.PerfBenchmark): 20 class _MemoryInfra(perf_benchmark.PerfBenchmark):
18 """Base class for new-generation memory benchmarks based on memory-infra. 21 """Base class for new-generation memory benchmarks based on memory-infra.
19 22
20 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which 23 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which
21 is part of chrome tracing, and extracts it using timeline-based measurements. 24 is part of chrome tracing, and extracts it using timeline-based measurements.
22 """ 25 """
23 26
24 # Subclasses can override this to use TBMv2 instead of TBMv1. 27 # Subclasses can override this to use TBMv2 instead of TBMv1.
25 TBM_VERSION = 1 28 TBM_VERSION = 1
26 29
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 benchmarks (including the ones in this file) will switch to use it instead 85 benchmarks (including the ones in this file) will switch to use it instead
83 of the TBMv1 metric and this temporary benchmark will be removed. See 86 of the TBMv1 metric and this temporary benchmark will be removed. See
84 crbug.com/60361. 87 crbug.com/60361.
85 """ 88 """
86 TBM_VERSION = 2 89 TBM_VERSION = 2
87 90
88 @classmethod 91 @classmethod
89 def Name(cls): 92 def Name(cls):
90 return 'memory.top_10_mobile_tbmv2' 93 return 'memory.top_10_mobile_tbmv2'
91 94
95 @classmethod
96 def ValueCanBeAddedPredicate(cls, value, is_first_result):
97 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
98 # is able to cope with the data load generated by TBMv2 metrics.
99 return not _IGNORED_STATS_RE.search(value.name)
100
92 101
93 # Benchmark is disabled by default because it takes too long to run. 102 # Benchmark is disabled by default because it takes too long to run.
94 @benchmark.Disabled('all') 103 @benchmark.Disabled('all')
95 class DualBrowserBenchmark(_MemoryInfra): 104 class DualBrowserBenchmark(_MemoryInfra):
96 """Measures memory usage while interacting with two different browsers. 105 """Measures memory usage while interacting with two different browsers.
97 106
98 The user story involves going back and forth between doing Google searches 107 The user story involves going back and forth between doing Google searches
99 on a webview-based browser (a stand in for the Search app), and loading 108 on a webview-based browser (a stand in for the Search app), and loading
100 pages on a select browser. 109 pages on a select browser.
101 """ 110 """
102 TBM_VERSION = 2 111 TBM_VERSION = 2
103 page_set = page_sets.DualBrowserStorySet 112 page_set = page_sets.DualBrowserStorySet
104 options = {'pageset_repeat': 5} 113 options = {'pageset_repeat': 5}
105 114
106 @classmethod 115 @classmethod
107 def Name(cls): 116 def Name(cls):
108 return 'memory.dual_browser_test' 117 return 'memory.dual_browser_test'
109 118
119 @classmethod
120 def ValueCanBeAddedPredicate(cls, value, is_first_result):
121 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
122 # is able to cope with the data load generated by TBMv2 metrics.
123 return not _IGNORED_STATS_RE.search(value.name)
124
110 125
111 # TODO(bashi): Workaround for http://crbug.com/532075 126 # TODO(bashi): Workaround for http://crbug.com/532075
112 # @benchmark.Enabled('android') shouldn't be needed. 127 # @benchmark.Enabled('android') shouldn't be needed.
113 @benchmark.Enabled('android') 128 @benchmark.Enabled('android')
114 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): 129 class RendererMemoryBlinkMemoryMobile(_MemoryInfra):
115 """Timeline based benchmark for measuring memory consumption on mobile 130 """Timeline based benchmark for measuring memory consumption on mobile
116 sites on which blink's memory consumption is relatively high.""" 131 sites on which blink's memory consumption is relatively high."""
117 132
118 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer') 133 _RE_RENDERER_VALUES = re.compile('memory_.+_renderer')
119 134
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 180
166 @benchmark.Disabled('android-webview') # http://crbug.com/612210 181 @benchmark.Disabled('android-webview') # http://crbug.com/612210
167 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): 182 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark):
168 """Use (recorded) real world web sites and measure memory consumption 183 """Use (recorded) real world web sites and measure memory consumption
169 of long running idle Gmail page """ 184 of long running idle Gmail page """
170 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 185 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
171 186
172 @classmethod 187 @classmethod
173 def Name(cls): 188 def Name(cls):
174 return 'memory.long_running_idle_gmail_background_tbmv2' 189 return 'memory.long_running_idle_gmail_background_tbmv2'
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