OLD | NEW |
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 import os | 5 import os |
6 | 6 |
7 from adb_profile_chrome import trace_packager | 7 from profile_chrome import trace_packager |
8 from adb_profile_chrome import ui | 8 from profile_chrome import ui |
9 | 9 |
10 from pylib import constants | 10 from pylib import constants |
11 | 11 |
12 | 12 |
13 def _StartTracing(controllers, interval): | 13 def _StartTracing(controllers, interval): |
14 for controller in controllers: | 14 for controller in controllers: |
15 controller.StartTracing(interval) | 15 controller.StartTracing(interval) |
16 | 16 |
17 | 17 |
18 def _StopTracing(controllers): | 18 def _StopTracing(controllers): |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 else: | 78 else: |
79 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \ | 79 ui.PrintMessage('Capturing %s. Press Enter to stop...' % \ |
80 trace_type, eol='') | 80 trace_type, eol='') |
81 raw_input() | 81 raw_input() |
82 finally: | 82 finally: |
83 _StopTracing(controllers) | 83 _StopTracing(controllers) |
84 if interval: | 84 if interval: |
85 ui.PrintMessage('done') | 85 ui.PrintMessage('done') |
86 | 86 |
87 return _PullTraces(controllers, output, compress, write_json) | 87 return _PullTraces(controllers, output, compress, write_json) |
OLD | NEW |