OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import logging | 7 import logging |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import sys | 10 import sys |
11 import webbrowser | 11 import webbrowser |
12 | 12 |
13 from adb_profile_chrome import chrome_controller | 13 from profile_chrome import chrome_controller |
14 from adb_profile_chrome import perf_controller | 14 from profile_chrome import perf_controller |
15 from adb_profile_chrome import profiler | 15 from profile_chrome import profiler |
16 from adb_profile_chrome import systrace_controller | 16 from profile_chrome import systrace_controller |
17 from adb_profile_chrome import ui | 17 from profile_chrome import ui |
18 | 18 |
19 from pylib import android_commands | 19 from pylib import android_commands |
20 from pylib.device import device_utils | 20 from pylib.device import device_utils |
21 | 21 |
22 | 22 |
23 _DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES' | 23 _DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES' |
24 | 24 |
25 | 25 |
26 def _ComputeChromeCategories(options): | 26 def _ComputeChromeCategories(options): |
27 categories = [] | 27 categories = [] |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 enabled_controllers, | 241 enabled_controllers, |
242 options.time if not options.continuous else 0, | 242 options.time if not options.continuous else 0, |
243 output=options.output, | 243 output=options.output, |
244 compress=options.compress, | 244 compress=options.compress, |
245 write_json=options.json) | 245 write_json=options.json) |
246 if options.view: | 246 if options.view: |
247 if sys.platform == 'darwin': | 247 if sys.platform == 'darwin': |
248 os.system('/usr/bin/open %s' % os.path.abspath(result)) | 248 os.system('/usr/bin/open %s' % os.path.abspath(result)) |
249 else: | 249 else: |
250 webbrowser.open(result) | 250 webbrowser.open(result) |
OLD | NEW |