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

Side by Side Diff: tools/callstats.py

Issue 2369903002: [tools] Run callstats.py with --enable-benchmarking (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 | « no previous file | no next file » | 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 # Copyright 2016 the V8 project authors. All rights reserved. 2 # Copyright 2016 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 ''' 5 '''
6 Usage: callstats.py [-h] <command> ... 6 Usage: callstats.py [-h] <command> ...
7 7
8 Optional arguments: 8 Optional arguments:
9 -h, --help show this help message and exit 9 -h, --help show this help message and exit
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 user_data_dir = args.user_data_dir 146 user_data_dir = args.user_data_dir
147 else: 147 else:
148 user_data_dir = tempfile.mkdtemp(prefix="chr_") 148 user_data_dir = tempfile.mkdtemp(prefix="chr_")
149 js_flags = "--runtime-call-stats" 149 js_flags = "--runtime-call-stats"
150 if args.replay_wpr: js_flags += " --allow-natives-syntax" 150 if args.replay_wpr: js_flags += " --allow-natives-syntax"
151 if args.js_flags: js_flags += " " + args.js_flags 151 if args.js_flags: js_flags += " " + args.js_flags
152 chrome_flags = [ 152 chrome_flags = [
153 "--no-default-browser-check", 153 "--no-default-browser-check",
154 "--no-sandbox", 154 "--no-sandbox",
155 "--disable-translate", 155 "--disable-translate",
156 "--enable-benchmarking",
156 "--js-flags={}".format(js_flags), 157 "--js-flags={}".format(js_flags),
157 "--no-first-run", 158 "--no-first-run",
158 "--user-data-dir={}".format(user_data_dir), 159 "--user-data-dir={}".format(user_data_dir),
159 ] 160 ]
160 if args.replay_wpr: 161 if args.replay_wpr:
161 http_port = 4080 + args.port_offset 162 http_port = 4080 + args.port_offset
162 https_port = 4443 + args.port_offset 163 https_port = 4443 + args.port_offset
163 chrome_flags += [ 164 chrome_flags += [
164 "--host-resolver-rules=MAP *:80 localhost:%s, " \ 165 "--host-resolver-rules=MAP *:80 localhost:%s, " \
165 "MAP *:443 localhost:%s, " \ 166 "MAP *:443 localhost:%s, " \
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 args.error("use either option --sites-file or site URLs") 637 args.error("use either option --sites-file or site URLs")
637 sys.exit(1) 638 sys.exit(1)
638 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin): 639 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin):
639 args.error("options --replay-wpr and --replay-bin must be used together") 640 args.error("options --replay-wpr and --replay-bin must be used together")
640 sys.exit(1) 641 sys.exit(1)
641 else: 642 else:
642 args.func(args) 643 args.func(args)
643 644
644 if __name__ == "__main__": 645 if __name__ == "__main__":
645 sys.exit(main()) 646 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698