Index: tools/telemetry/telemetry/web_perf/timeline_interaction_record.py |
diff --git a/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py b/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py |
index 947e74f462cdab98b93fcaae3fa43e7f020c781f..4b047e54d49bf6165386380dc030d965f60d0eb1 100644 |
--- a/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py |
+++ b/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py |
@@ -7,15 +7,10 @@ import re |
import telemetry.timeline.bounds as timeline_bounds |
from telemetry import decorators |
-# Enables the smoothness metric for this interaction |
-IS_SMOOTH = 'is_smooth' |
# Allows multiple duplicate interactions of the same type |
REPEATABLE = 'repeatable' |
-METRICS = [ |
- IS_SMOOTH |
-] |
-FLAGS = METRICS + [REPEATABLE] |
+FLAGS = [REPEATABLE] |
class ThreadTimeRangeOverlappedException(Exception): |
@@ -55,7 +50,10 @@ def GetJavaScriptMarker(label, flags): |
AssertionError: If one or more of the flags is unrecognized. |
""" |
_AssertFlagsAreValid(flags) |
- return 'Interaction.%s/%s' % (label, ','.join(flags)) |
+ marker = 'Interaction.%s' % label |
+ if flags: |
+ marker += '/%s' % (','.join(flags)) |
+ return marker |
class TimelineInteractionRecord(object): |
"""Represents an interaction that took place during a timeline recording. |
@@ -82,7 +80,7 @@ class TimelineInteractionRecord(object): |
is currently done by pushing markers into the console.time/timeEnd API: this |
for instance can be issued in JS: |
- var str = 'Interaction.SendEmail/is_smooth'; |
+ var str = 'Interaction.SendEmail'; |
console.time(str); |
setTimeout(function() { |
console.timeEnd(str); |
@@ -90,11 +88,9 @@ class TimelineInteractionRecord(object): |
When run with perf.measurements.timeline_based_measurement running, this will |
then cause a TimelineInteractionRecord to be created for this range with |
- smoothness and responsive metrics reported for the marked up 1000ms |
- time-range. |
+ all metrics reported for the marked up 1000ms time-range. |
The valid interaction flags are: |
- * is_smooth: Enables the smoothness metric |
* repeatable: Allows other interactions to use the same label |
""" |
@@ -120,10 +116,6 @@ class TimelineInteractionRecord(object): |
return self._end |
@property |
- def is_smooth(self): |
- return IS_SMOOTH in self._flags |
- |
- @property |
def repeatable(self): |
return REPEATABLE in self._flags |
@@ -154,16 +146,6 @@ class TimelineInteractionRecord(object): |
bounds.AddValue(self.end) |
return bounds |
- def HasMetric(self, metric_type): |
- if metric_type not in METRICS: |
- raise AssertionError('Unrecognized metric type for a timeline ' |
- 'interaction record: %s' % metric_type) |
- return metric_type in self._flags |
- |
- def GetUserDefinedFlags(self): |
- return [metric_type for metric_type in METRICS |
- if metric_type in self._flags] |
- |
def GetOverlappedThreadTimeForSlice(self, timeline_slice): |
"""Get the thread duration of timeline_slice that overlaps with this record. |