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

Unified Diff: tools/callstats.py

Issue 2559723002: [tools] Fix printed chromium command in callstats (Closed)
Patch Set: Arg delimiters Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/callstats.py
diff --git a/tools/callstats.py b/tools/callstats.py
index c8a2436c4fcd0876588d59533a4d020f83c4d6f4..cc22e08ec90f340270f58d2e488d589867612950 100755
--- a/tools/callstats.py
+++ b/tools/callstats.py
@@ -126,25 +126,28 @@ def generate_injection(f, sites, refreshes=0):
onLoad(window.location.href);
})();"""
-def get_chrome_flags(js_flags, user_data_dir):
+def get_chrome_flags(js_flags, user_data_dir, arg_delimiter=""):
return [
"--no-default-browser-check",
"--no-sandbox",
"--disable-translate",
"--enable-benchmarking",
- "--js-flags={}".format(js_flags),
+ "--enable-stats-table",
+ "--js-flags={}{}{}".format(arg_delimiter, js_flags, arg_delimiter),
"--no-first-run",
- "--user-data-dir={}".format(user_data_dir),
+ "--user-data-dir={}{}{}".format(arg_delimiter, user_data_dir,
+ arg_delimiter),
]
-def get_chrome_replay_flags(args):
+def get_chrome_replay_flags(args, arg_delimiter=""):
http_port = 4080 + args.port_offset
https_port = 4443 + args.port_offset
return [
- "--host-resolver-rules=MAP *:80 localhost:%s, " \
- "MAP *:443 localhost:%s, " \
- "EXCLUDE localhost" % (
- http_port, https_port),
+ "--host-resolver-rules=%sMAP *:80 localhost:%s, " \
+ "MAP *:443 localhost:%s, " \
+ "EXCLUDE localhost%s" % (
+ arg_delimiter, http_port, https_port,
+ arg_delimiter),
"--ignore-certificate-errors",
"--disable-seccomp-sandbox",
"--disable-web-security",
@@ -295,10 +298,10 @@ def do_run_replay_server(args):
print(" "+site['url'])
print("- " * 40)
print("Launch chromium with the following commands for debugging:")
- flags = get_chrome_flags("'--runtime-call-stats --allow-natives-syntax'",
- "/var/tmp/`date +%s`")
- flags += get_chrome_replay_flags(args)
- print(" $CHROMIUM_DIR/out/Release/chomium " + (" ".join(flags)) + " <URL>")
+ flags = get_chrome_flags("--runtime-call-stats --allow-natives-syntax",
+ "/var/tmp/`date +%s`", '"')
+ flags += get_chrome_replay_flags(args, "'")
+ print(" $CHROMIUM_DIR/out/Release/chrome " + (" ".join(flags)) + " <URL>")
print("- " * 40)
replay_server = start_replay_server(args, sites, discard_output=False)
try:
« 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