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

Side by Side Diff: tools/perf/measurements/smooth_gesture_util.py

Issue 439383002: Add GetThreadToInteractionRecordsMapsFromModel method to timeline_interaction_record. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import copy 4 import copy
5 5
6 from telemetry.web_perf import timeline_interaction_record as tir_module 6 from telemetry.web_perf import timeline_interaction_record as tir_module
7 7
8 8
9 def GetAdjustedInteractionIfContainGesture(timeline, interaction_record): 9 def GetAdjustedInteractionIfContainGesture(timeline, interaction_record):
10 """ Returns a new interaction record if interaction_record contains geture 10 """ Returns a new interaction record if interaction_record contains geture
(...skipping 15 matching lines...) Expand all
26 'SyntheticGestureController::running') 26 'SyntheticGestureController::running')
27 if ev.start <= interaction_record.end and 27 if ev.start <= interaction_record.end and
28 ev.end >= interaction_record.start] 28 ev.end >= interaction_record.start]
29 if len(gesture_events) == 0: 29 if len(gesture_events) == 0:
30 return copy.copy(interaction_record) 30 return copy.copy(interaction_record)
31 if len(gesture_events) > 1: 31 if len(gesture_events) > 1:
32 raise Exception('More than one possible synthetic gesture marker found in ' 32 raise Exception('More than one possible synthetic gesture marker found in '
33 'interaction_record %s.' % interaction_record.label) 33 'interaction_record %s.' % interaction_record.label)
34 return tir_module.TimelineInteractionRecord(interaction_record.label, 34 return tir_module.TimelineInteractionRecord(interaction_record.label,
35 gesture_events[0].start, 35 gesture_events[0].start,
36 gesture_events[0].end) 36 gesture_events[0].end,
37 interaction_record.async_event,
38 [tir_module.IS_SMOOTH])
OLDNEW
« no previous file with comments | « tools/perf/measurements/loading_trace.py ('k') | tools/perf/measurements/smoothness_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698