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

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

Issue 2639213002: Adds four benchmarks to measure v8 runtime + GC metrics on browsing story set. (Closed)
Patch Set: Remove categories not needed for gcMetric. 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 benchmarks import v8_helper 7 from benchmarks import v8_helper
8 from core import perf_benchmark 8 from core import perf_benchmark
9 from telemetry import benchmark 9 from telemetry import benchmark
10 from telemetry.timeline import chrome_trace_config 10 from telemetry.timeline import chrome_trace_config
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return ('renderer_processes' in value.name and 79 return ('renderer_processes' in value.name and
80 not _IGNORED_MEMORY_STATS_RE.search(value.name)) 80 not _IGNORED_MEMORY_STATS_RE.search(value.name))
81 return (_V8_GC_HIGH_LEVEL_STATS_RE.search(value.name) and 81 return (_V8_GC_HIGH_LEVEL_STATS_RE.search(value.name) and
82 not _IGNORED_V8_STATS_RE.search(value.name)) 82 not _IGNORED_V8_STATS_RE.search(value.name))
83 83
84 @classmethod 84 @classmethod
85 def ShouldTearDownStateAfterEachStoryRun(cls): 85 def ShouldTearDownStateAfterEachStoryRun(cls):
86 return True 86 return True
87 87
88 88
89 class _V8RuntimeStatsBrowsingBenchmark(perf_benchmark.PerfBenchmark):
90 """Base class for V8 browsing benchmarks that measure RuntimeStats.
91 RuntimeStats measure the time spent by v8 in different phases like
92 compile, JS execute, runtime etc.,
93 See browsing_stories._BrowsingStory for workload description.
94 """
95
96 def CreateTimelineBasedMeasurementOptions(self):
97 categories = [
98 # Disable all categories by default.
99 '-*',
100 # Memory categories.
101 'disabled-by-default-memory-infra',
102 # UE categories requred by runtimeStatsTotalMetric to bucket
103 # runtimeStats by UE.
104 'rail',
105 # V8 categories.
106 'blink.console',
107 'disabled-by-default-v8.gc',
108 'renderer.scheduler',
109 'v8',
110 'webkit.console',
111 'disabled-by-default-v8.runtime_stats',
112 ]
113 options = timeline_based_measurement.Options(
114 chrome_trace_category_filter.ChromeTraceCategoryFilter(
115 ','.join(categories)))
116 options.config.enable_android_graphics_memtrack = True
117 # Trigger periodic light memory dumps every 1000 ms.
118 memory_dump_config = chrome_trace_config.MemoryDumpConfig()
119 memory_dump_config.AddTrigger('light', 1000)
120 options.config.chrome_trace_config.SetMemoryDumpConfig(memory_dump_config)
121
122 options.SetTimelineBasedMetrics(['runtimeStatsTotalMetric', 'gcMetric'])
123 return options
124
125 def CreateStorySet(self, options):
126 return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse')
127
128 @classmethod
129 def Name(cls):
130 return 'v8.runtimestats.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX)
131
132 @classmethod
133 def ShouldTearDownStateAfterEachStoryRun(cls):
134 return True
135
136
89 class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark): 137 class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
90 138
91 @classmethod 139 @classmethod
92 def ShouldDisable(cls, possible_browser): 140 def ShouldDisable(cls, possible_browser):
93 # http://crbug.com/628736 141 # http://crbug.com/628736
94 if (possible_browser.platform.GetOSName() == 'mac' and 142 if (possible_browser.platform.GetOSName() == 'mac' and
95 possible_browser.browser_type == 'reference'): 143 possible_browser.browser_type == 'reference'):
96 return True 144 return True
97 145
98 return possible_browser.platform.GetDeviceTypeName() != 'Desktop' 146 return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 196
149 197
150 @benchmark.Disabled('reference') # http://crbug.com/628631 198 @benchmark.Disabled('reference') # http://crbug.com/628631
151 class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark): 199 class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark):
152 PLATFORM = 'mobile' 200 PLATFORM = 'mobile'
153 TEST_SUFFIX = '_turbo' 201 TEST_SUFFIX = '_turbo'
154 202
155 def SetExtraBrowserOptions(self, options): 203 def SetExtraBrowserOptions(self, options):
156 super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions( 204 super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions(
157 options) 205 options)
206
207
208 class V8RuntimeStatsDesktopBrowsingBenchmark(
209 _V8RuntimeStatsBrowsingBenchmark):
210 PLATFORM = 'desktop'
211 TEST_SUFFIX = ''
212
213 @classmethod
214 def ShouldDisable(cls, possible_browser):
215 return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
216
217
218 class V8RuntimeStatsDesktopTurboBrowsingBenchmark(
219 _V8RuntimeStatsBrowsingBenchmark):
220 PLATFORM = 'desktop'
221 TEST_SUFFIX = '_turbo'
222
223 def SetExtraBrowserOptions(self, options):
224 super(V8RuntimeStatsDesktopTurboBrowsingBenchmark,
225 self).SetExtraBrowserOptions(options)
158 v8_helper.EnableTurbo(options) 226 v8_helper.EnableTurbo(options)
227
228 @classmethod
229 def ShouldDisable(cls, possible_browser):
230 return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
231
232
233 class V8RuntimeStatsMobileBrowsingBenchmark(
234 _V8RuntimeStatsBrowsingBenchmark):
235 PLATFORM = 'mobile'
236 TEST_SUFFIX = ''
237
238 def SetExtraBrowserOptions(self, options):
239 super(V8RuntimeStatsMobileBrowsingBenchmark,
240 self).SetExtraBrowserOptions(options)
241 v8_helper.EnableTurbo(options)
242
243 @classmethod
244 def ShouldDisable(cls, possible_browser):
245 return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
246
247
248 class V8RuntimeStatsMobileTurboBrowsingBenchmark(
249 _V8RuntimeStatsBrowsingBenchmark):
250 PLATFORM = 'mobile'
251 TEST_SUFFIX = '_turbo'
252
253 def SetExtraBrowserOptions(self, options):
254 super(V8RuntimeStatsMobileTurboBrowsingBenchmark,
255 self).SetExtraBrowserOptions(options)
256 v8_helper.EnableTurbo(options)
257
258 @classmethod
259 def ShouldDisable(cls, possible_browser):
260 return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
261
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