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

Unified Diff: tools/perf/measurements/smooth_gesture_util.py

Issue 1067883002: [Telemetry] Add the feature of narrowing down the "gesture" interaction record to TBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix import statement in timeline_controller Created 5 years, 8 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
« no previous file with comments | « no previous file | tools/perf/measurements/smooth_gesture_util_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/smooth_gesture_util.py
diff --git a/tools/perf/measurements/smooth_gesture_util.py b/tools/perf/measurements/smooth_gesture_util.py
deleted file mode 100644
index 8fe32573844c4e2e853c95d99b489d948abe5655..0000000000000000000000000000000000000000
--- a/tools/perf/measurements/smooth_gesture_util.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import copy
-
-from telemetry.web_perf import timeline_interaction_record as tir_module
-
-
-def GetAdjustedInteractionIfContainGesture(timeline, interaction_record):
- """ Returns a new interaction record if interaction_record contains geture
- whose time range that overlaps with interaction_record's range. If not,
- returns a clone of original interaction_record.
- The synthetic gesture controller inserts a trace marker to precisely
- demarcate when the gesture was running. We check for overlap, not inclusion,
- because gesture_actions can start/end slightly outside the telemetry markers
- on Windows. This problem is probably caused by a race condition between
- the browser and renderer process submitting the trace events for the
- markers.
- """
- # Only adjust the range for gestures.
- if not interaction_record.label.startswith('Gesture_'):
- return copy.copy(interaction_record)
- gesture_events = [
- ev for ev
- in timeline.IterAllAsyncSlicesOfName('SyntheticGestureController::running')
- if ev.parent_slice is None and
- ev.start <= interaction_record.end and
- ev.end >= interaction_record.start]
- if len(gesture_events) == 0:
- return copy.copy(interaction_record)
- if len(gesture_events) > 1:
- raise Exception('More than one possible synthetic gesture marker found in '
- 'interaction_record %s.' % interaction_record.label)
- return tir_module.TimelineInteractionRecord(
- interaction_record.label, gesture_events[0].start,
- gesture_events[0].end, gesture_events[0],
- interaction_record._flags) # pylint: disable=W0212
« no previous file with comments | « no previous file | tools/perf/measurements/smooth_gesture_util_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698