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

Side by Side Diff: tools/telemetry/examples/measure_trace.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual adjustments in tools/perf Created 5 years, 9 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import collections 6 import collections
7 import json 7 import json
8 import os 8 import os
9 import sys 9 import sys
10 10
11 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) 11 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
12 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 12 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
13 'perf')) 13 'perf'))
14 14
15 from telemetry.page import page as page_module 15 from telemetry.page import page as page_module
16 from telemetry.results import buildbot_output_formatter
17 from telemetry.results import page_test_results
16 from telemetry.timeline import model 18 from telemetry.timeline import model
17 from telemetry.timeline import tracing_timeline_data 19 from telemetry.timeline import tracing_timeline_data
18 from telemetry.results import page_test_results 20 from telemetry.web_perf.metrics import smoothness
19 from telemetry.results import buildbot_output_formatter
20 from telemetry.web_perf import timeline_interaction_record as tir_module 21 from telemetry.web_perf import timeline_interaction_record as tir_module
21 from telemetry.web_perf.metrics import smoothness
22 # pylint: disable=F0401 22 # pylint: disable=F0401
aiolos (Not reviewing) 2015/03/24 01:22:23 Should add a line between the telemetry imports an
23 from measurements import smooth_gesture_util
23 from measurements import smoothness_controller 24 from measurements import smoothness_controller
24 from measurements import smooth_gesture_util
25 25
26 26
27 def _ExtractInteractionsRecordFromThread(thread, timeline_model): 27 def _ExtractInteractionsRecordFromThread(thread, timeline_model):
28 run_smooth_actions_record = None 28 run_smooth_actions_record = None
29 records = [] 29 records = []
30 for event in thread.async_slices: 30 for event in thread.async_slices:
31 if not tir_module.IsTimelineInteractionRecord(event.name): 31 if not tir_module.IsTimelineInteractionRecord(event.name):
32 continue 32 continue
33 assert event.start_thread 33 assert event.start_thread
34 assert event.start_thread is event.end_thread 34 assert event.start_thread is event.end_thread
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 results.WillRunPage(page) 77 results.WillRunPage(page)
78 smoothness_metric.AddResults( 78 smoothness_metric.AddResults(
79 timeline_model, thread, records, results) 79 timeline_model, thread, records, results)
80 results.DidRunPage(page) 80 results.DidRunPage(page)
81 results.PrintSummary() 81 results.PrintSummary()
82 return 0 82 return 0
83 83
84 84
85 if __name__ == '__main__': 85 if __name__ == '__main__':
86 sys.exit(Main(sys.argv[1:])) 86 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/history_profile_extender_unittest.py ('k') | tools/telemetry/telemetry/benchmark.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698