Skip to content

Commit

Permalink
Add standardized WebVR pages and debug trace categories
Browse files Browse the repository at this point in the history
Adds a new page for WebVR Telemetry tests meant for fill-rate testing.

Also adds a new set of pages that is the same as xr.webvr.static, but
with VSync alignment turned off and pages set to use a standardized
render resolution across all devices. Also updates the WebVR samples
repo hash to a more recent once since the standardized size option
was not available in the previous version.

Adds two tracing categories to the WebVR Telemetry tests that aren't
used for metrics, but are useful for debugging regressions.

Bug: 
Change-Id: Ife71aa419822a6b3d2859af2c7556749f1fa5b0b
Reviewed-on: https://chromium-review.googlesource.com/692601
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506540}
  • Loading branch information
bsheedy authored and Commit Bot committed Oct 4, 2017
1 parent ac6dc70 commit ed9c174
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 38 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ deps = {
Var('chromium_git') + '/chromium/frame_rate/content.git' + '@' + 'c10272c88463efeef6bb19c9ec07c42bc8fe22b9',

'src/chrome/test/data/vr/webvr_info':
Var('chromium_git') + '/external/github.com/toji/webvr.info.git' + '@' + '932fd58075e564727b5525681d6b9293b41a90f7',
Var('chromium_git') + '/external/github.com/toji/webvr.info.git' + '@' + 'd73e6182287e3c6c0daa4d3d2ea578a31a2e5a6b',

'src/ios/third_party/earl_grey/src': {
'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + 'b8f1ed850b3b8c059d2912ac4c25a2480ddba826',
Expand Down
6 changes: 4 additions & 2 deletions tools/perf/contrib/vr_benchmarks/vr_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ class XrWebVrStatic(_BaseVRBenchmark):
def CreateCoreTimelineBasedMeasurementOptions(self):
memory_categories = ['blink.console', 'disabled-by-default-memory-infra']
gpu_categories = ['gpu']
debug_categories = ['toplevel', 'viz']
category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
','.join(['-*'] + memory_categories + gpu_categories))
','.join(['-*'] + memory_categories + gpu_categories
+ debug_categories))
options = timeline_based_measurement.Options(category_filter)
options.config.enable_android_graphics_memtrack = True
options.config.enable_platform_display_trace = True
Expand Down Expand Up @@ -71,7 +73,7 @@ class XrBrowsingStatic(_BaseVRBenchmark):
SUPPORTED_PLATFORMS = [story.expectations.ALL_ANDROID]

def CreateTimelineBasedMeasurementOptions(self):
custom_categories = ['gpu']
custom_categories = ['gpu', 'toplevel', 'viz']
category_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter(
','.join(custom_categories))
options = timeline_based_measurement.Options(category_filter)
Expand Down
8 changes: 5 additions & 3 deletions tools/perf/contrib/vr_benchmarks/vr_sample_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
class VrSamplePage(page.Page):
"""Superclass for all VR sample pages."""

def __init__(self, sample_page, page_set, get_parameters=None):
def __init__(self, sample_page, page_set, url_parameters=None,
extra_browser_args=None):
url = '%s.html' % sample_page
if get_parameters is not None:
url += '?' + '&'.join(get_parameters)
if url_parameters is not None:
url += '?' + '&'.join(url_parameters)
name = url.replace('.html', '')
url = 'file://' + os.path.join(SAMPLE_DIR, url)
super(VrSamplePage, self).__init__(
url=url,
page_set=page_set,
name=name,
extra_browser_args=extra_browser_args,
shared_page_state_class=vr_state.SharedAndroidVrPageState)
self._shared_page_state = None

Expand Down
57 changes: 25 additions & 32 deletions tools/perf/contrib/vr_benchmarks/webvr_sample_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

class WebVrSamplePage(VrSamplePage):

def __init__(self, page_set, get_parameters):
def __init__(self, page_set, url_parameters, extra_browser_args=None):
super(WebVrSamplePage, self).__init__(
sample_page='test-slow-render',
page_set=page_set,
get_parameters=get_parameters)
url_parameters=url_parameters,
extra_browser_args=extra_browser_args)

def RunPageInteractions(self, action_runner):
action_runner.TapElement(selector='canvas[id="webgl-canvas"]')
Expand All @@ -25,33 +26,25 @@ class WebVrSamplePageSet(story.StorySet):
def __init__(self):
super(WebVrSamplePageSet, self).__init__()

# Standard sample app with no changes
self.AddStory(
WebVrSamplePage(self, [
'canvasClickPresents=1',
'renderScale=1',
]))
# Increased render scale
self.AddStory(
WebVrSamplePage(self, [
'canvasClickPresents=1',
'renderScale=1.5',
]))
# Default render scale, increased load
self.AddStory(
WebVrSamplePage(self, [
'canvasClickPresents=1',
'renderScale=1',
'heavyGpu=1',
'cubeScale=0.2',
'workTime=5',
]))
# Further increased load
self.AddStory(
WebVrSamplePage(self, [
'canvasClickPresents=1',
'renderScale=1',
'heavyGpu=1',
'cubeScale=0.3',
'workTime=10',
]))
test_cases = [
# Standard sample app with no changes
['canvasClickPresents=1', 'renderScale=1'],
# Increased render scale
['canvasClickPresents=1', 'renderScale=1.5'],
# Default render scale, increased load
['canvasClickPresents=1', 'renderScale=1', 'heavyGpu=1', 'cubeScale=0.2',
'workTime=5'],
# Further increased load
['canvasClickPresents=1', 'renderScale=1', 'heavyGpu=1', 'cubeScale=0.3',
'workTime=10'],
# Absurd load for fill-rate testing
['canvasClickPresents=1', 'renderScale=1.6', 'heavyGpu=1',
'cubeScale=0.3', 'workTime=4'],
]

for url_parameters in test_cases:
# Standard set of pages with defaults
self.AddStory(WebVrSamplePage(self, url_parameters))
# Set of pages with standardized render size and VSync alignment disabled
self.AddStory(WebVrSamplePage(self, url_parameters + ['standardSize=1'],
extra_browser_args=['--disable-features=WebVrVsyncAlign']))

0 comments on commit ed9c174

Please sign in to comment.