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

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

Issue 2668923002: [tools/perf] Enable memory mobile benchmarks only on Android (Closed)
Patch Set: Created 3 years, 10 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 chrome_trace_category_filter 10 from telemetry.timeline import chrome_trace_category_filter
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 def SetExtraBrowserOptions(self, options): 44 def SetExtraBrowserOptions(self, options):
45 # Just before we measure memory we flush the system caches 45 # Just before we measure memory we flush the system caches
46 # unfortunately this doesn't immediately take effect, instead 46 # unfortunately this doesn't immediately take effect, instead
47 # the next page run is effected. Due to this the first page run 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 48 # has anomalous results. This option causes us to flush caches
49 # each time before Chrome starts so we effect even the first page 49 # each time before Chrome starts so we effect even the first page
50 # - avoiding the bug. 50 # - avoiding the bug.
51 options.clear_sytem_cache_for_browser_and_profile_on_start = True 51 options.clear_sytem_cache_for_browser_and_profile_on_start = True
52 52
53 53
54 # TODO(bashi): Workaround for http://crbug.com/532075. 54 @benchmark.Enabled('android') # catapult:#3176
55 # @benchmark.Enabled('android') shouldn't be needed.
56 @benchmark.Enabled('android')
57 class MemoryBenchmarkTop10Mobile(_MemoryInfra): 55 class MemoryBenchmarkTop10Mobile(_MemoryInfra):
58 """Measure foreground/background memory on top 10 mobile page set. 56 """Measure foreground/background memory on top 10 mobile page set.
59 57
60 This metric provides memory measurements for the System Health Plan of 58 This metric provides memory measurements for the System Health Plan of
61 Chrome on Android. 59 Chrome on Android.
62 """ 60 """
63 page_set = page_sets.MemoryTop10Mobile 61 page_set = page_sets.MemoryTop10Mobile
64 options = {'pageset_repeat': 5} 62 options = {'pageset_repeat': 5}
65 63
66 @classmethod 64 @classmethod
67 def Name(cls): 65 def Name(cls):
68 return 'memory.top_10_mobile' 66 return 'memory.top_10_mobile'
69 67
70 @classmethod 68 @classmethod
71 def ShouldTearDownStateAfterEachStoryRun(cls): 69 def ShouldTearDownStateAfterEachStoryRun(cls):
72 return False 70 return False
73 71
74 @classmethod 72 @classmethod
75 def ValueCanBeAddedPredicate(cls, value, is_first_result): 73 def ValueCanBeAddedPredicate(cls, value, is_first_result):
76 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard 74 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
77 # is able to cope with the data load generated by TBMv2 metrics. 75 # is able to cope with the data load generated by TBMv2 metrics.
78 return not _IGNORED_STATS_RE.search(value.name) 76 return not _IGNORED_STATS_RE.search(value.name)
79 77
80 78
81 @benchmark.Disabled('win', 'mac', 'linux') # https://crbug.com/687258 79 @benchmark.Enabled('android') # catapult:#3176
82 class MemoryBenchmarkTop10MobileStress(MemoryBenchmarkTop10Mobile): 80 class MemoryBenchmarkTop10MobileStress(MemoryBenchmarkTop10Mobile):
83 """Run top 10 mobile page set without closing/restarting the browser. 81 """Run top 10 mobile page set without closing/restarting the browser.
84 82
85 This benchmark is intended to stress-test the browser, catching memory leaks 83 This benchmark is intended to stress-test the browser, catching memory leaks
86 or possible crashes after interacting with the browser for a period of time. 84 or possible crashes after interacting with the browser for a period of time.
87 """ 85 """
88 page_set = page_sets.MemoryTop10MobileRealistic 86 page_set = page_sets.MemoryTop10MobileRealistic
89 87
90 @classmethod 88 @classmethod
91 def Name(cls): 89 def Name(cls):
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 def ShouldTearDownStateAfterEachStorySetRun(cls): 144 def ShouldTearDownStateAfterEachStorySetRun(cls):
147 return False 145 return False
148 146
149 @classmethod 147 @classmethod
150 def ValueCanBeAddedPredicate(cls, value, is_first_result): 148 def ValueCanBeAddedPredicate(cls, value, is_first_result):
151 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard 149 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard
152 # is able to cope with the data load generated by TBMv2 metrics. 150 # is able to cope with the data load generated by TBMv2 metrics.
153 return not _IGNORED_STATS_RE.search(value.name) 151 return not _IGNORED_STATS_RE.search(value.name)
154 152
155 153
156 # TODO(bashi): Workaround for http://crbug.com/532075 154 @benchmark.Enabled('android') # catapult:#3176
157 # @benchmark.Enabled('android') shouldn't be needed.
158 @benchmark.Enabled('android')
159 class RendererMemoryBlinkMemoryMobile(_MemoryInfra): 155 class RendererMemoryBlinkMemoryMobile(_MemoryInfra):
160 """Timeline based benchmark for measuring memory consumption on mobile 156 """Timeline based benchmark for measuring memory consumption on mobile
161 sites on which blink's memory consumption is relatively high. 157 sites on which blink's memory consumption is relatively high.
162 """ 158 """
163 page_set = page_sets.BlinkMemoryMobilePageSet 159 page_set = page_sets.BlinkMemoryMobilePageSet
164 160
165 def SetExtraBrowserOptions(self, options): 161 def SetExtraBrowserOptions(self, options):
166 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions( 162 super(RendererMemoryBlinkMemoryMobile, self).SetExtraBrowserOptions(
167 options) 163 options)
168 options.AppendExtraBrowserArgs([ 164 options.AppendExtraBrowserArgs([
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 of long running idle Gmail page """ 239 of long running idle Gmail page """
244 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 240 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
245 241
246 @classmethod 242 @classmethod
247 def Name(cls): 243 def Name(cls):
248 return 'memory.long_running_idle_gmail_background_tbmv2' 244 return 'memory.long_running_idle_gmail_background_tbmv2'
249 245
250 @classmethod 246 @classmethod
251 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 247 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530
252 return cls.IsSvelte(possible_browser) 248 return cls.IsSvelte(possible_browser)
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