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

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

Issue 273103003: Add responsiveness_metric for timeline_based_measurement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 dbf605b1103fd77d642dee9f103e12880d1bbc73..2ef303cbfb7ade17ae49011ee1966fef0d191a6e 100644
--- a/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py
+++ b/tools/telemetry/telemetry/web_perf/timeline_interaction_record.py
@@ -9,11 +9,11 @@ import telemetry.core.timeline.bounds as timeline_bounds
IS_SMOOTH = "is_smooth"
-IS_LOADING_RESOURCES = "is_loading_resources"
+IS_RESPONSIVE = "is_responsive"
FLAGS = [
IS_SMOOTH,
- IS_LOADING_RESOURCES
+ IS_RESPONSIVE
]
def IsTimelineInteractionRecord(event_name):
@@ -45,7 +45,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,is_loading_resources';
+ var str = 'Interaction.SendEmail/is_smooth,is_responsive';
console.time(str);
setTimeout(function() {
console.timeEnd(str);
@@ -56,14 +56,19 @@ class TimelineInteractionRecord(object):
smoothness and network metrics to be reported for the marked up 1000ms
time-range.
+ start and end are timestamps in seconds.
+
"""
- def __init__(self, logical_name, start, end):
+ def __init__(self, logical_name, start, end, thread_start=None,
+ thread_end=None):
assert logical_name
self.logical_name = logical_name
self.start = start
self.end = end
+ self.thread_start = thread_start
+ self.thread_end = thread_end
self.is_smooth = False
- self.is_loading_resources = False
+ self.is_responsive = False
@staticmethod
def FromEvent(event):
@@ -80,13 +85,14 @@ class TimelineInteractionRecord(object):
logical_name = m.group(1)
flags = []
- record = TimelineInteractionRecord(logical_name, event.start, event.end)
+ record = TimelineInteractionRecord(logical_name, event.start, event.end,
+ event.thread_start, event.thread_end)
chrishenry 2014/05/13 03:22:38 align after (
nednguyen 2014/05/14 17:32:27 Done.
for f in flags:
if not f in FLAGS:
raise Exception(
'Unrecognized flag in timeline Interaction record: %s' % f)
record.is_smooth = IS_SMOOTH in flags
- record.is_loading_resources = IS_LOADING_RESOURCES in flags
+ record.is_responsive = IS_RESPONSIVE in flags
return record
def GetResultNameFor(self, result_name):

Powered by Google App Engine
This is Rietveld 408576698