| 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..0a39021a68f434c7ba8fdec490dfbb2ab866cde9 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)
|
| 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):
|
|
|