diff options
author | ulan <ulan@chromium.org> | 2015-11-23 07:41:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-23 15:42:06 +0000 |
commit | c2da6320db663fe44cba68cd8460bdd13ef1824e (patch) | |
tree | b79efd00503048a1410e252fd6640cd60fd8a607 | |
parent | 980b96715ce7d4445de48463733f268e74686910 (diff) | |
download | chromium_src-c2da6320db663fe44cba68cd8460bdd13ef1824e.zip chromium_src-c2da6320db663fe44cba68cd8460bdd13ef1824e.tar.gz chromium_src-c2da6320db663fe44cba68cd8460bdd13ef1824e.tar.bz2 |
Oort Online benchmark based on TBM.
BUG=551798
CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_10_10_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect
Review URL: https://codereview.chromium.org/1424213006
Cr-Commit-Position: refs/heads/master@{#361107}
-rw-r--r-- | tools/perf/benchmarks/oortonline.py | 57 | ||||
-rw-r--r-- | tools/perf/page_sets/oortonline.py | 35 |
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)) |