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

Unified 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: Also collect GC metrics. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/v8_browsing.py
diff --git a/tools/perf/benchmarks/v8_browsing.py b/tools/perf/benchmarks/v8_browsing.py
index 6f2f08b5f624488581d2508760fee0b13dc6659f..34be3919280434bd86bfe07c14a69bd8cd04747f 100644
--- a/tools/perf/benchmarks/v8_browsing.py
+++ b/tools/perf/benchmarks/v8_browsing.py
@@ -86,6 +86,38 @@ class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark):
return True
+class _V8RuntimeStatsBrowsingBenchmark(_V8BrowsingBenchmark):
+ """Base class for V8 browsing benchmarks that measure RuntimeStats.
+ RuntimeStats measure the time spent by v8 in different phases like
+ compile, JS execute, runtime etc.,
+ See browsing_stories._BrowsingStory for workload description.
+ """
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ # Adds options for GC and v8 execution metrics.
+ options = super(_V8RuntimeStatsBrowsingBenchmark,
+ self).CreateTimelineBasedMeasurementOptions()
+
+ # Add options for runtime stats metric.
+ options.category_filter.AddIncludedCategory('v8')
+ options.category_filter.AddDisabledByDefault(
+ 'disabled-by-default-v8.runtime_stats')
+
+ # Enable rail to bucket runtime stats based on UE.
+ options.category_filter.AddIncludedCategory('rail')
+
+ options.AddTimelineBasedMetric('runtimeStatsTotalMetric')
nednguyen 2017/02/13 20:28:22 Also wouldn't you also enable GC metrics?
mythria 2017/02/14 14:48:30 I made this a subclass of V8 browsing benchmark, s
nednguyen 2017/02/14 15:05:25 The problem with this approach is besides GC, it w
mythria 2017/02/14 16:05:34 Thanks, Done.
+ return options
+
+ @classmethod
+ def Name(cls):
+ return 'v8.runtimestats.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX)
+
+ @classmethod
+ def ShouldTearDownStateAfterEachStoryRun(cls):
+ return True
+
+
class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
@classmethod
@@ -155,4 +187,59 @@ class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark):
def SetExtraBrowserOptions(self, options):
super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions(
options)
+
+
+class V8RuntimeStatsDesktopBrowsingBenchmark(
+ _V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'desktop'
+ TEST_SUFFIX = ''
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
+
+
+class V8RuntimeStatsDesktopTurboBrowsingBenchmark(
+ _V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'desktop'
+ TEST_SUFFIX = '_turbo'
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsDesktopTurboBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
v8_helper.EnableTurbo(options)
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
+
+
+class V8RuntimeStatsMobileBrowsingBenchmark(
+ _V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'mobile'
+ TEST_SUFFIX = ''
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsMobileBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
+ v8_helper.EnableTurbo(options)
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
+
+
+class V8RuntimeStatsMobileTurboBrowsingBenchmark(
+ _V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'mobile'
+ TEST_SUFFIX = '_turbo'
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsMobileTurboBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
+ v8_helper.EnableTurbo(options)
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
+
« 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