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

Unified Diff: systrace/bin/adb_profile_chrome_startup

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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | systrace/profile_chrome/atrace_tracing_agent.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: systrace/bin/adb_profile_chrome_startup
diff --git a/systrace/bin/adb_profile_chrome_startup b/systrace/bin/adb_profile_chrome_startup
index 0e99d18f1703cca2cde3a05f8a5ad2cd8c6546f1..80a266bfd2272c735466acbaed728a8b6284e2c1 100755
--- a/systrace/bin/adb_profile_chrome_startup
+++ b/systrace/bin/adb_profile_chrome_startup
@@ -33,15 +33,6 @@ def _CreateOptionParser():
'/developers/how-tos/trace-event-profiling-'
'tool for detailed instructions for '
'profiling.')
- parser.add_option('--url', help='URL to visit on startup. Default: '
- 'https://www.google.com. An empty URL launches Chrome with'
- ' a MAIN action instead of VIEW.',
- default='https://www.google.com', metavar='URL')
- parser.add_option('--cold', help='Flush the OS page cache before starting the'
- ' browser. Note that this require a device with root '
- 'access.', default=False, action='store_true')
- parser.add_option_group(flags.AtraceOptions(parser))
- parser.add_option_group(flags.OutputOptions(parser))
browsers = sorted(profiler.GetSupportedBrowsers().keys())
parser.add_option('-b', '--browser', help='Select among installed browsers. '
@@ -55,6 +46,11 @@ def _CreateOptionParser():
parser.add_option('-t', '--time', help='Stops tracing after N seconds, 0 to '
'manually stop (startup trace ends after at most 5s).',
default=5, metavar='N', type='int')
+
+ parser.add_option_group(chrome_startup_tracing_agent.add_options(parser))
+ parser.add_option_group(atrace_tracing_agent.add_options(parser))
+ parser.add_option_group(flags.OutputOptions(parser))
+
return parser
@@ -89,7 +85,8 @@ def main():
device, package_info, options.cold, options.url))
if options.output:
options.output = os.path.expanduser(options.output)
- result = profiler.CaptureProfile(enabled_agents,
+ result = profiler.CaptureProfile(options,
+ enabled_agents,
options.time,
output=options.output,
compress=options.compress,
« no previous file with comments | « no previous file | systrace/profile_chrome/atrace_tracing_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698