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

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