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

Unified Diff: tools/telemetry/telemetry/web_perf/timeline_interaction_record.py

Issue 1013803003: [Telemetry] Remove is_smooth flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing test Created 5 years, 9 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
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.

Powered by Google App Engine
This is Rietveld 408576698