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

Side by Side Diff: tools/perf/measurements/smoothness_controller.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 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 sys 4 import sys
5 5
6 from telemetry.core.platform import tracing_category_filter 6 from telemetry.core.platform import tracing_category_filter
7 from telemetry.core.platform import tracing_options 7 from telemetry.core.platform import tracing_options
8 from telemetry.page import action_runner 8 from telemetry.page import action_runner
9 from telemetry.page import page_test 9 from telemetry.page import page_test
10 from telemetry.timeline.model import TimelineModel 10 from telemetry.timeline.model import TimelineModel
11 from telemetry.timeline import trace_data as trace_data_module 11 from telemetry.timeline import trace_data as trace_data_module
12 from telemetry.value import list_of_scalar_values 12 from telemetry.value import list_of_scalar_values
13 from telemetry.value import scalar 13 from telemetry.value import scalar
14 from telemetry.value import trace 14 from telemetry.value import trace
15 from telemetry.web_perf.metrics import smoothness 15 from telemetry.web_perf.metrics import smoothness
16 from telemetry.web_perf import smooth_gesture_util
16 from telemetry.web_perf import timeline_interaction_record as tir_module 17 from telemetry.web_perf import timeline_interaction_record as tir_module
17 18
18 from measurements import smooth_gesture_util
19
20 19
21 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' 20 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'
22 21
23 22
24 class SmoothnessController(object): 23 class SmoothnessController(object):
25 def __init__(self): 24 def __init__(self):
26 self._timeline_model = None 25 self._timeline_model = None
27 self._trace_data = None 26 self._trace_data = None
28 self._interaction = None 27 self._interaction = None
29 self._surface_flinger_trace_data = None 28 self._surface_flinger_trace_data = None
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 # Create an interaction_record for this legacy measurement. Since we don't 93 # Create an interaction_record for this legacy measurement. Since we don't
95 # wrap the results that are sent to smoothness metric, the label will 94 # wrap the results that are sent to smoothness metric, the label will
96 # not be used. 95 # not be used.
97 smoothness_metric = smoothness.SmoothnessMetric() 96 smoothness_metric = smoothness.SmoothnessMetric()
98 smoothness_metric.AddResults( 97 smoothness_metric.AddResults(
99 self._timeline_model, renderer_thread, smooth_records, results) 98 self._timeline_model, renderer_thread, smooth_records, results)
100 99
101 def CleanUp(self, tab): 100 def CleanUp(self, tab):
102 if tab.browser.platform.tracing_controller.is_tracing_running: 101 if tab.browser.platform.tracing_controller.is_tracing_running:
103 tab.browser.platform.tracing_controller.Stop() 102 tab.browser.platform.tracing_controller.Stop()
OLDNEW
« no previous file with comments | « tools/perf/measurements/smooth_gesture_util_unittest.py ('k') | tools/perf/measurements/timeline_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698