Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: tools/telemetry/telemetry/page/actions/action_runner.py

Issue 367523002: Handle multiple duplicate timeline interaction records. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update unittests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/timeline_based_measurement.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/action_runner.py
diff --git a/tools/telemetry/telemetry/page/actions/action_runner.py b/tools/telemetry/telemetry/page/actions/action_runner.py
index b63a904671cf1f93acd1f56907df6b6230210cce..06b901119a781918fbe08891ff2703bcd3fadb0c 100644
--- a/tools/telemetry/telemetry/page/actions/action_runner.py
+++ b/tools/telemetry/telemetry/page/actions/action_runner.py
@@ -31,7 +31,8 @@ class ActionRunner(object):
action.WillRunAction(self._tab)
action.RunAction(self._tab)
- def BeginInteraction(self, label, is_smooth=False, is_responsive=False):
+ def BeginInteraction(self, label, is_smooth=False, is_responsive=False,
+ repeatable=False):
"""Marks the beginning of an interaction record.
An interaction record is a labeled time period containing
@@ -46,19 +47,24 @@ class ActionRunner(object):
is_smooth: Whether to check for smoothness metrics for this interaction.
is_responsive: Whether to check for responsiveness metrics for
this interaction.
+ repeatable: Whether other interactions may use the same logical name
+ as this interaction. All interactions with the same logical name must
+ have the same flags.
"""
flags = []
if is_smooth:
flags.append(tir_module.IS_SMOOTH)
if is_responsive:
flags.append(tir_module.IS_RESPONSIVE)
+ if repeatable:
+ flags.append(tir_module.REPEATABLE)
interaction = Interaction(self._tab, label, flags)
interaction.Begin()
return interaction
- def BeginGestureInteraction(
- self, label, is_smooth=False, is_responsive=False):
+ def BeginGestureInteraction(self, label, is_smooth=False, is_responsive=False,
+ repeatable=False):
"""Marks the beginning of a gesture-based interaction record.
This is similar to normal interaction record, but it will
@@ -75,8 +81,12 @@ class ActionRunner(object):
is_smooth: Whether to check for smoothness metrics for this interaction.
is_responsive: Whether to check for responsiveness metrics for
this interaction.
+ repeatable: Whether other interactions may use the same logical name
+ as this interaction. All interactions with the same logical name must
+ have the same flags.
"""
- return self.BeginInteraction('Gesture_' + label, is_smooth, is_responsive)
+ return self.BeginInteraction('Gesture_' + label, is_smooth, is_responsive,
+ repeatable)
def NavigateToPage(self, page, timeout_in_seconds=60):
"""Navigate to the given page.
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/timeline_based_measurement.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698