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

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

Issue 2276263003: Pass in custom options to Systrace agents (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Rebase Created 4 years, 3 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/ddms_tracing_agent_unittest.py ('k') | systrace/profile_chrome/main.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 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 optparse 5 import optparse
6 6
7 def AtraceOptions(parser):
8 atrace_opts = optparse.OptionGroup(parser, 'Systrace tracing options')
9 atrace_opts.add_option('-s', '--systrace', help='Capture a systrace with '
10 'the chosen comma-delimited systrace categories. You'
11 ' can also capture a combined Chrome + systrace by '
12 'enabling both types of categories. Use "list" to '
13 'see the available categories. Systrace is disabled'
14 ' by default. Note that in this case, Systrace is '
15 'synonymous with Atrace.',
16 metavar='ATRACE_CATEGORIES',
17 dest='atrace_categories', default='')
18 return atrace_opts
19
20 7
21 def OutputOptions(parser): 8 def OutputOptions(parser):
22 output_options = optparse.OptionGroup(parser, 'Output options') 9 output_options = optparse.OptionGroup(parser, 'Output options')
23 output_options.add_option('-o', '--output', help='Save trace output to file.') 10 output_options.add_option('-o', '--output', help='Save trace output to file.')
24 output_options.add_option('--json', help='Save trace as raw JSON instead of ' 11 output_options.add_option('--json', help='Save trace as raw JSON instead of '
25 'HTML.', action='store_true') 12 'HTML.', action='store_true')
26 output_options.add_option('--view', help='Open resulting trace file in a ' 13 output_options.add_option('--view', help='Open resulting trace file in a '
27 'browser.', action='store_true') 14 'browser.', action='store_true')
28 return output_options 15 return output_options
OLDNEW
« no previous file with comments | « systrace/profile_chrome/ddms_tracing_agent_unittest.py ('k') | systrace/profile_chrome/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698