summaryrefslogtreecommitdiffstats
path: root/tools/perf/page_sets
diff options
context:
space:
mode:
authornednguyen <nednguyen@google.com>2015-04-27 17:08:09 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-28 00:09:13 +0000
commiteb2eca9416822d172e0098e43790d41e7d33732c (patch)
tree2149b3cc35380b8d42f2ae4bda04d33534263a79 /tools/perf/page_sets
parentf4617bb4a4d989933ca60a050605478f2737b9ab (diff)
downloadchromium_src-eb2eca9416822d172e0098e43790d41e7d33732c.zip
chromium_src-eb2eca9416822d172e0098e43790d41e7d33732c.tar.gz
chromium_src-eb2eca9416822d172e0098e43790d41e7d33732c.tar.bz2
[Telemetry] Remove support for automatic record creation in smoothness controller.
Add logic to make sure that page sets paired with smoothness/repaint only have interaction records with same label & they have repeatable flags enabled. To make sure that this doesn't crash any smoothness benchmarks, I modified benchmark_smoke_unittest to run all smoothness benchmarks (including ones that only support android) in patch #3. To validate the test runs, see telemetry_perf_unittest's result in patch #5 smoothness.key_silk_cases: https://codereview.chromium.org/1111543002/ smoothness.polymer: https://codereview.chromium.org/1060583012 BUG=444701,444703 Review URL: https://codereview.chromium.org/1104573002 Cr-Commit-Position: refs/heads/master@{#327186}
Diffstat (limited to 'tools/perf/page_sets')
-rw-r--r--tools/perf/page_sets/key_silk_cases.py23
-rw-r--r--tools/perf/page_sets/polymer.py10
2 files changed, 19 insertions, 14 deletions
diff --git a/tools/perf/page_sets/key_silk_cases.py b/tools/perf/page_sets/key_silk_cases.py
index 347ed92..9c35a7c 100644
--- a/tools/perf/page_sets/key_silk_cases.py
+++ b/tools/perf/page_sets/key_silk_cases.py
@@ -319,13 +319,16 @@ class Page17(KeySilkCasesPage):
self.StressHideyBars(action_runner)
def StressHideyBars(self, action_runner):
- with action_runner.CreateGestureInteraction('ScrollAction'):
+ with action_runner.CreateGestureInteraction(
+ 'ScrollAction', repeatable=True):
action_runner.ScrollElement(
selector='#messages', direction='down', speed_in_pixels_per_second=200)
- with action_runner.CreateGestureInteraction('ScrollAction'):
+ with action_runner.CreateGestureInteraction(
+ 'ScrollAction', repeatable=True):
action_runner.ScrollElement(
selector='#messages', direction='up', speed_in_pixels_per_second=200)
- with action_runner.CreateGestureInteraction('ScrollAction'):
+ with action_runner.CreateGestureInteraction(
+ 'ScrollAction', repeatable=True):
action_runner.ScrollElement(
selector='#messages', direction='down',
speed_in_pixels_per_second=200)
@@ -343,7 +346,7 @@ class Page18(KeySilkCasesPage):
self.ToggleDrawer(action_runner)
def ToggleDrawer(self, action_runner):
- with action_runner.CreateInteraction('Action_TapAction'):
+ with action_runner.CreateInteraction('Action_TapAction', repeatable=True):
action_runner.TapElement('#menu-button')
action_runner.Wait(1)
@@ -482,12 +485,14 @@ class Page23(KeySilkCasesPage):
page_set=page_set, run_no_page_interactions=run_no_page_interactions)
def PerformPageInteractions(self, action_runner):
- with action_runner.CreateGestureInteraction('ScrollAction'):
+ with action_runner.CreateGestureInteraction('ScrollAction',
+ repeatable=True):
action_runner.ScrollPage(
distance_expr='window.innerHeight / 2',
direction='down',
use_touch=True)
- with action_runner.CreateInteraction('Wait'):
+ with action_runner.CreateGestureInteraction('ScrollAction',
+ repeatable=True):
action_runner.Wait(1)
@@ -530,11 +535,11 @@ class Page25(KeySilkCasesPage):
action_runner.Wait(1)
def PerformPageInteractions(self, action_runner):
- with action_runner.CreateGestureInteraction('SwipeAction'):
+ with action_runner.CreateGestureInteraction('SwipeAction', repeatable=True):
action_runner.SwipeElement(
direction='left', distance=100,
element_function='document.getElementById(":f")')
- with action_runner.CreateInteraction('Wait'):
+ with action_runner.CreateGestureInteraction('SwipeAction', repeatable=True):
action_runner.Wait(1)
@@ -577,7 +582,7 @@ class SVGIconRaster(KeySilkCasesPage):
for i in xrange(9):
button_func = ('document.getElementById("demo").$.'
'buttons.children[%d]') % i
- with action_runner.CreateInteraction('Action_TapAction'):
+ with action_runner.CreateInteraction('Action_TapAction', repeatable=True):
action_runner.TapElement(element_function=button_func)
action_runner.Wait(1)
diff --git a/tools/perf/page_sets/polymer.py b/tools/perf/page_sets/polymer.py
index bbab4d4..e75fc09 100644
--- a/tools/perf/page_sets/polymer.py
+++ b/tools/perf/page_sets/polymer.py
@@ -53,7 +53,7 @@ class PolymerCalculatorPage(PolymerPage):
self.SlidePanel(action_runner)
def TapButton(self, action_runner):
- with action_runner.CreateInteraction('Action_TapAction'):
+ with action_runner.CreateInteraction('PolymerAnimation', repeatable=True):
action_runner.TapElement(element_function='''
document.querySelector(
'body /deep/ #outerPanels'
@@ -72,7 +72,7 @@ class PolymerCalculatorPage(PolymerPage):
return outer.opened || outer.wideMode;
}());''')
if not opened:
- with action_runner.CreateInteraction('Action_SwipeAction'):
+ with action_runner.CreateInteraction('PolymerAnimation', repeatable=True):
action_runner.SwipeElement(
left_start_ratio=0.1, top_start_ratio=0.2,
direction='left', distance=300, speed_in_pixels_per_second=5000,
@@ -155,12 +155,12 @@ class PolymerSampler(PolymerPage):
def ScrollContentPane(self, action_runner):
element_function = (self.iframe_js + '.querySelector('
'"core-scroll-header-panel").$.mainContainer')
- with action_runner.CreateInteraction('Scroll_Page'):
+ with action_runner.CreateInteraction('Scroll_Page', repeatable=True):
action_runner.ScrollElement(use_touch=True,
direction='down',
distance='900',
element_function=element_function)
- with action_runner.CreateInteraction('Scroll_Page'):
+ with action_runner.CreateInteraction('Scroll_Page', repeatable=True):
action_runner.ScrollElement(use_touch=True,
direction='up',
distance='900',
@@ -201,7 +201,7 @@ class PolymerSampler(PolymerPage):
action_function(action_runner, element_query)
def TapWidget(self, action_runner, element_function):
- with action_runner.CreateInteraction('Tap_Widget'):
+ with action_runner.CreateInteraction('Tap_Widget', repeatable=True):
action_runner.TapElement(element_function=element_function)
action_runner.Wait(1) # wait for e.g. animations on the widget