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

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: Updated desktop benchmarks and adding mobile benchmarks. 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..c972226b14dbb51c1c20981fc628a31e888f5e71 100644
--- a/tools/perf/benchmarks/v8_browsing.py
+++ b/tools/perf/benchmarks/v8_browsing.py
@@ -86,6 +86,42 @@ class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark):
return True
+class _V8RuntimeStatsBrowsingBenchmark(perf_benchmark.PerfBenchmark):
+ """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):
+ cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
+
+ # Catagories for getting user expecations.
+ cat_filter.AddIncludedCategory('rail')
+ cat_filter.AddIncludedCategory('input')
+
+ # V8 needed categories
+ cat_filter.AddIncludedCategory('v8')
+ cat_filter.AddDisabledByDefault('disabled-by-default-v8.runtime_stats')
+
+ tbm_options = timeline_based_measurement.Options(
+ overhead_level=cat_filter)
+ tbm_options.SetTimelineBasedMetrics(['runtimeStatsTotalMetric'])
Camillo Bruni 2017/02/10 12:37:21 Could you add the GC metrics as well here? (I pres
+ return tbm_options
+
+
+ def CreateStorySet(self, options):
+ return page_sets.SystemHealthStorySet(platform=self.PLATFORM, case='browse')
+
+ @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 +191,55 @@ class V8MobileTurboBrowsingBenchmark(_V8MobileBrowsingBenchmark):
def SetExtraBrowserOptions(self, options):
super(V8MobileTurboBrowsingBenchmark, self).SetExtraBrowserOptions(
options)
+
+
+class _V8RuntimeStatsDesktopBrowsingBenchmark(_V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'desktop'
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
+
+
+class _V8RuntimeStatsMobileBrowsingBenchmark(_V8RuntimeStatsBrowsingBenchmark):
+ PLATFORM = 'mobile'
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
+
+
+class V8RuntimeStatsDesktopBrowsingBenchmark(
+ _V8RuntimeStatsDesktopBrowsingBenchmark):
+ TEST_SUFFIX = ''
+
+
+class V8RuntimeStatsDesktopTurboBrowsingBenchmark(
+ _V8RuntimeStatsDesktopBrowsingBenchmark):
+ TEST_SUFFIX = '_turbo'
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsDesktopTurboBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
v8_helper.EnableTurbo(options)
+
+
+class V8RuntimeStatsMobileBrowsingBenchmark(
+ _V8RuntimeStatsMobileBrowsingBenchmark):
+ TEST_SUFFIX = ''
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsMobileBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
+ v8_helper.EnableTurbo(options)
+
+
+class V8RuntimeStatsMobileTurboBrowsingBenchmark(
+ _V8RuntimeStatsMobileBrowsingBenchmark):
+ TEST_SUFFIX = '_turbo'
+
+ def SetExtraBrowserOptions(self, options):
+ super(V8RuntimeStatsMobileTurboBrowsingBenchmark,
+ self).SetExtraBrowserOptions(options)
+ v8_helper.EnableTurbo(options)
+
« 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