summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/benchmarks/oortonline.py57
-rw-r--r--tools/perf/page_sets/oortonline.py35
2 files changed, 91 insertions, 1 deletions
diff --git a/tools/perf/benchmarks/oortonline.py b/tools/perf/benchmarks/oortonline.py
index 216007f..f5c46a5 100644
--- a/tools/perf/benchmarks/oortonline.py
+++ b/tools/perf/benchmarks/oortonline.py
@@ -9,6 +9,12 @@ from telemetry import benchmark
from telemetry.page import page_test
from telemetry.value import scalar
from telemetry.value import improvement_direction
+from telemetry.timeline import tracing_category_filter
+from telemetry.web_perf import timeline_based_measurement
+from telemetry.web_perf.metrics import v8_gc_latency
+from telemetry.web_perf.metrics import smoothness
+from telemetry.web_perf.metrics import memory_timeline
+
class _OortOnlineMeasurement(page_test.PageTest):
def __init__(self):
@@ -38,3 +44,54 @@ class OortOnline(perf_benchmark.PerfBenchmark):
def CreateStorySet(self, options):
return page_sets.OortOnlinePageSet()
+
+
+# Disabled on reference builds because they don't support the new
+# Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
+@benchmark.Disabled('reference')
+@benchmark.Disabled('android')
+class OortOnlineTBM(perf_benchmark.PerfBenchmark):
+ """OortOnline benchmark that measures WebGL and V8 performance.
+ URL: http://oortonline.gl/#run
+ Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html
+ """
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs([
+ # TODO(perezju): Temporary workaround to disable periodic memory dumps.
+ # See: http://crbug.com/513692
+ '--enable-memory-benchmarking',
+ # TODO(ssid): Remove this flag after fixing http://crbug.com/461788.
+ '--no-sandbox'
+ ])
+
+ def CreateStorySet(self, options):
+ return page_sets.OortOnlineTBMPageSet()
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ v8_gc_latency_categories = [
+ 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console']
+ smoothness_categories = [
+ 'webkit.console', 'blink.console', 'benchmark', 'trace_event_overhead']
+ categories = list(set(v8_gc_latency_categories + smoothness_categories))
+ memory_categories = 'blink.console,disabled-by-default-memory-infra'
+ category_filter = tracing_category_filter.TracingCategoryFilter(
+ memory_categories)
+ for category in categories:
+ category_filter.AddIncludedCategory(category)
+ options = timeline_based_measurement.Options(category_filter)
+ options.SetTimelineBasedMetrics([v8_gc_latency.V8GCLatency(),
+ smoothness.SmoothnessMetric(),
+ memory_timeline.MemoryTimelineMetric()])
+ return options
+
+ @classmethod
+ def Name(cls):
+ return 'oortonline_tbm'
+
+ @classmethod
+ def ValueCanBeAddedPredicate(cls, value, is_first_result):
+ if value.tir_label in ['Begin', 'End']:
+ return value.name.startswith('memory_') and 'v8_renderer' in value.name
+ else:
+ return value.tir_label == 'Running'
diff --git a/tools/perf/page_sets/oortonline.py b/tools/perf/page_sets/oortonline.py
index bd57464..6e1f6e8 100644
--- a/tools/perf/page_sets/oortonline.py
+++ b/tools/perf/page_sets/oortonline.py
@@ -39,9 +39,42 @@ class OortOnlinePageSet(story.StorySet):
URL: http://oortonline.gl/#run
Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html
"""
-
def __init__(self):
super(OortOnlinePageSet, self).__init__(
archive_data_file='data/oortonline.json',
cloud_storage_bucket=story.PARTNER_BUCKET)
self.AddStory(OortOnlinePage(self))
+
+class OortOnlineTBMPage(OortOnlinePage):
+ def __init__(self, page_set):
+ super(OortOnlineTBMPage, self).__init__(page_set=page_set)
+
+ def RunPageInteractions(self, action_runner):
+ WAIT_TIME_IN_SECONDS = 2
+ RUN_TIME_IN_SECONDS = 20
+ action_runner.WaitForJavaScriptCondition('window.benchmarkStarted')
+ # Perform GC to get rid of start-up garbage.
+ action_runner.ForceGarbageCollection()
+ with action_runner.CreateInteraction('Begin'):
+ action_runner.tab.browser.DumpMemory()
+ # Skip the first few seconds to get more stable frame times.
+ action_runner.Wait(WAIT_TIME_IN_SECONDS)
+ with action_runner.CreateInteraction('Running'):
+ # We cannot wait until benchmarkFinished because true because the result
+ # screen does not update, which affects frame-time discrepancy
+ # computation. Instead we stop based on timer.
+ action_runner.Wait(RUN_TIME_IN_SECONDS)
+ with action_runner.CreateInteraction('End'):
+ action_runner.tab.browser.DumpMemory()
+
+class OortOnlineTBMPageSet(story.StorySet):
+ """Oort Online WebGL benchmark for TBM.
+ URL: http://oortonline.gl/#run
+ Info: http://v8project.blogspot.de/2015/10/jank-busters-part-one.html
+ """
+
+ def __init__(self):
+ super(OortOnlineTBMPageSet, self).__init__(
+ archive_data_file='data/oortonline.json',
+ cloud_storage_bucket=story.PARTNER_BUCKET)
+ self.AddStory(OortOnlineTBMPage(self))