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

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

Issue 1896113003: [tools/perf] Update users of action_runner to directly referencing it from tab.action_runner field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « tools/perf/measurements/oilpan_gc_times.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4
5 from telemetry.page import action_runner
6 from telemetry.page import page_test 5 from telemetry.page import page_test
7 from telemetry.timeline.model import TimelineModel 6 from telemetry.timeline.model import TimelineModel
8 from telemetry.timeline import tracing_config 7 from telemetry.timeline import tracing_config
9 from telemetry.value import trace 8 from telemetry.value import trace
10 from telemetry.web_perf import smooth_gesture_util 9 from telemetry.web_perf import smooth_gesture_util
11 from telemetry.web_perf import timeline_interaction_record as tir_module 10 from telemetry.web_perf import timeline_interaction_record as tir_module
12 11
13 12
14 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions' 13 RUN_SMOOTH_ACTIONS = 'RunSmoothAllActions'
15 14
(...skipping 20 matching lines...) Expand all
36 raise Exception('Not supported') 35 raise Exception('Not supported')
37 config = tracing_config.TracingConfig() 36 config = tracing_config.TracingConfig()
38 config.tracing_category_filter.AddFilterString(self.trace_categories) 37 config.tracing_category_filter.AddFilterString(self.trace_categories)
39 for delay in page.GetSyntheticDelayCategories(): 38 for delay in page.GetSyntheticDelayCategories():
40 config.tracing_category_filter.AddSyntheticDelay(delay) 39 config.tracing_category_filter.AddSyntheticDelay(delay)
41 config.enable_chrome_trace = True 40 config.enable_chrome_trace = True
42 tab.browser.platform.tracing_controller.StartTracing(config) 41 tab.browser.platform.tracing_controller.StartTracing(config)
43 42
44 def Start(self, tab): 43 def Start(self, tab):
45 # Start the smooth marker for all actions. 44 # Start the smooth marker for all actions.
46 runner = action_runner.ActionRunner(tab)
47 if self._enable_auto_issuing_record: 45 if self._enable_auto_issuing_record:
48 self._interaction = runner.CreateInteraction( 46 self._interaction = tab.action_runner.CreateInteraction(
49 RUN_SMOOTH_ACTIONS) 47 RUN_SMOOTH_ACTIONS)
50 self._interaction.Begin() 48 self._interaction.Begin()
51 49
52 def Stop(self, tab, results): 50 def Stop(self, tab, results):
53 # End the smooth marker for all actions. 51 # End the smooth marker for all actions.
54 if self._enable_auto_issuing_record: 52 if self._enable_auto_issuing_record:
55 self._interaction.End() 53 self._interaction.End()
56 # Stop tracing. 54 # Stop tracing.
57 timeline_data = tab.browser.platform.tracing_controller.StopTracing() 55 timeline_data = tab.browser.platform.tracing_controller.StopTracing()
58 results.AddValue(trace.TraceValue( 56 results.AddValue(trace.TraceValue(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 def model(self): 93 def model(self):
96 return self._model 94 return self._model
97 95
98 @property 96 @property
99 def renderer_process(self): 97 def renderer_process(self):
100 return self._renderer_process 98 return self._renderer_process
101 99
102 @property 100 @property
103 def smooth_records(self): 101 def smooth_records(self):
104 return self._smooth_records 102 return self._smooth_records
OLDNEW
« no previous file with comments | « tools/perf/measurements/oilpan_gc_times.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698