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

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: Rebased the patch. Created 3 years, 11 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if 'memory:chrome' in value.name: 78 if 'memory:chrome' in value.name:
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 class _V8RuntimeStatsBrowsingBenchmark(perf_benchmark.PerfBenchmark):
89 """Base class for V8 browsing benchmarks that measure RuntimeStats.
90 RuntimeStats measure the time spent by v8 in different phases like
91 compile, JS execute, runtime etc.,
92 See browsing_stories._BrowsingStory for workload description.
93 """
94
95 def CreateTimelineBasedMeasurementOptions(self):
96 cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
97
98 # V8 needed categories
99 cat_filter.AddIncludedCategory('v8')
100 cat_filter.AddDisabledByDefault('disabled-by-default-v8.runtime_stats')
101
102 tbm_options = timeline_based_measurement.Options(
103 overhead_level=cat_filter)
104 tbm_options.SetTimelineBasedMetrics(['runtimeStatsInteractiveMetric'])
Camillo Bruni 2017/01/19 19:08:23 This should now be runtimeStatsTotalMetric, no? A
105 return tbm_options
106
107
108 def CreateStorySet(self, options):
109 return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse')
110
111 @classmethod
112 def Name(cls):
113 return 'v8.runtimestats.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX)
114
115 @classmethod
116 def ShouldTearDownStateAfterEachStoryRun(cls):
117 return True
118
88 119
89 class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark): 120 class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
90 121
91 @classmethod 122 @classmethod
92 def ShouldDisable(cls, possible_browser): 123 def ShouldDisable(cls, possible_browser):
93 # http://crbug.com/628736 124 # http://crbug.com/628736
94 if (possible_browser.platform.GetOSName() == 'mac' and 125 if (possible_browser.platform.GetOSName() == 'mac' and
95 possible_browser.browser_type == 'reference'): 126 possible_browser.browser_type == 'reference'):
96 return True 127 return True
97 128
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 179
149 180
150 @benchmark.Disabled('reference') # http://crbug.com/628631 181 @benchmark.Disabled('reference') # http://crbug.com/628631
151 class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark): 182 class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark):
152 PLATFORM = 'mobile' 183 PLATFORM = 'mobile'
153 TEST_SUFFIX = '_turbo' 184 TEST_SUFFIX = '_turbo'
154 185
155 def SetExtraBrowserOptions(self, options): 186 def SetExtraBrowserOptions(self, options):
156 super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions( 187 super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions(
157 options) 188 options)
189
190
191 @benchmark.Disabled('android') # http://crbug.com/682167
192 class V8RuntimeStatsDesktopBrowsingBenchmark(
193 _V8RuntimeStatsBrowsingBenchmark):
194 PLATFORM = 'desktop'
195 TEST_SUFFIX = ''
196
197
198 @benchmark.Disabled('android') # http://crbug.com/682167
199 class V8RuntimeStatsDesktopTurboBrowsingBenchmark(
200 _V8RuntimeStatsBrowsingBenchmark):
201 PLATFORM = 'desktop'
202 TEST_SUFFIX = '_turbo'
203
204 def SetExtraBrowserOptions(self, options):
205 super(V8RuntimeStatsDesktopTurboBrowsingBenchmark,
206 self).SetExtraBrowserOptions(options)
158 v8_helper.EnableTurbo(options) 207 v8_helper.EnableTurbo(options)
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