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

Side by Side Diff: systrace/profile_chrome/main.py

Issue 2401053002: Revert of Update systrace and profile_chrome's default agent behavior (Closed)
Patch Set: Created 4 years, 2 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 | « systrace/profile_chrome/chrome_tracing_agent.py ('k') | systrace/systrace/run_systrace.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 elif len(devices) >= 2: 92 elif len(devices) >= 2:
93 raise RuntimeError('Multiple devices connected, serial number required') 93 raise RuntimeError('Multiple devices connected, serial number required')
94 options.device_serial_number = devices[0] 94 options.device_serial_number = devices[0]
95 device = device_utils.DeviceUtils.HealthyDevices(device_arg= 95 device = device_utils.DeviceUtils.HealthyDevices(device_arg=
96 options.device_serial_number)[0] 96 options.device_serial_number)[0]
97 package_info = util.get_supported_browsers()[options.browser] 97 package_info = util.get_supported_browsers()[options.browser]
98 98
99 options.device = device 99 options.device = device
100 options.package_info = package_info 100 options.package_info = package_info
101 101
102 # Include Chrome categories by default in profile_chrome.
103 if not options.chrome_categories:
104 options.chrome_categories = chrome_tracing_agent.DEFAULT_CHROME_CATEGORIES
105
106 if options.chrome_categories in ['list', 'help']: 102 if options.chrome_categories in ['list', 'help']:
107 ui.PrintMessage('Collecting record categories list...', eol='') 103 ui.PrintMessage('Collecting record categories list...', eol='')
108 record_categories = [] 104 record_categories = []
109 disabled_by_default_categories = [] 105 disabled_by_default_categories = []
110 record_categories, disabled_by_default_categories = \ 106 record_categories, disabled_by_default_categories = \
111 chrome_tracing_agent.ChromeTracingAgent.GetCategories( 107 chrome_tracing_agent.ChromeTracingAgent.GetCategories(
112 device, package_info) 108 device, package_info)
113 109
114 ui.PrintMessage('done') 110 ui.PrintMessage('done')
115 ui.PrintMessage('Record Categories:') 111 ui.PrintMessage('Record Categories:')
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 options.trace_time if not options.continuous else 0, 145 options.trace_time if not options.continuous else 0,
150 _PROFILE_CHROME_AGENT_MODULES, 146 _PROFILE_CHROME_AGENT_MODULES,
151 output=options.output_file, 147 output=options.output_file,
152 compress=options.compress, 148 compress=options.compress,
153 write_json=options.write_json) 149 write_json=options.write_json)
154 if options.view: 150 if options.view:
155 if sys.platform == 'darwin': 151 if sys.platform == 'darwin':
156 os.system('/usr/bin/open %s' % os.path.abspath(result)) 152 os.system('/usr/bin/open %s' % os.path.abspath(result))
157 else: 153 else:
158 webbrowser.open(result) 154 webbrowser.open(result)
OLDNEW
« no previous file with comments | « systrace/profile_chrome/chrome_tracing_agent.py ('k') | systrace/systrace/run_systrace.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698