Commit 47d70e71 authored by mikecase's avatar mikecase Committed by Commit bot

Add WebView Multiprocess startup benchmark.

This benchmark is almost identical to the existing WebView startup
benchmark, but with the --webview-sandboxed-renderer flag set.

Setting the pageset_repeat option for the WebView start-up benchmarks.
May make metric more stable to smooth out WebView loading from a cold
start vs. WebView being already loaded into Android's memory.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.perf:android_s5_perf_cq;master.tryserver.chromium.perf:linux_perf_cq;master.tryserver.chromium.perf:mac_retina_perf_cq;master.tryserver.chromium.perf:winx64_10_perf_cq

Review-Url: https://codereview.chromium.org/2307873003
Cr-Commit-Position: refs/heads/master@{#417378}
parent 124fd555
...@@ -151,7 +151,10 @@ class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): ...@@ -151,7 +151,10 @@ class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
markers recorded in atrace, Chrome tracing is not enabled for this markers recorded in atrace, Chrome tracing is not enabled for this
benchmark. benchmark.
""" """
page_set = page_sets.BlankPageSet options = {'pageset_repeat': 20}
def CreateStorySet(self, options):
return page_sets.SystemHealthStorySet(platform='mobile', case='blank')
def CreateTimelineBasedMeasurementOptions(self): def CreateTimelineBasedMeasurementOptions(self):
options = timeline_based_measurement.Options() options = timeline_based_measurement.Options()
...@@ -168,3 +171,21 @@ class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): ...@@ -168,3 +171,21 @@ class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark):
@classmethod @classmethod
def Name(cls): def Name(cls):
return 'system_health.webview_startup' return 'system_health.webview_startup'
@benchmark.Enabled('android-webview')
class WebviewMultiprocessStartupSystemHealthBenchmark(
WebviewStartupSystemHealthBenchmark):
"""Webview multiprocess startup time benchmark
Benchmark that measures how long WebView takes to start up
and load a blank page with multiprocess enabled.
"""
def SetExtraBrowserOptions(self, options):
options.AppendExtraBrowserArgs(
['--webview-sandboxed-renderer'])
@classmethod
def Name(cls):
return 'system_health.webview_startup_multiprocess'
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from page_sets.system_health import system_health_story
class BlankAboutBlankStory(system_health_story.SystemHealthStory):
"""Story that loads the about:blank page."""
NAME = 'blank:about:blank'
URL = 'about:blank'
def _DidLoadDocument(self, action_runner):
# Request a RAF and wait for it to be processed to ensure that the metric
# Startup.FirstWebContents.NonEmptyPaint2 is recorded.
action_runner.ExecuteJavaScript(
"""
window.__hasRunRAF = false;
requestAnimationFrame(function() {
window.__hasRunRAF = true;
});
"""
)
action_runner.WaitForJavaScriptCondition("window.__hasRunRAF")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment