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

Unified Diff: tools/callstats.py

Issue 2379613002: [tools] Fix typo in callstats.py (Closed)
Patch Set: addressing nit 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 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 fe9076f39b66f803315ae1b0266447d4e1d68854..262f9a6ade6b6557a223ff626f6797cd181e6ba5 100755
--- a/tools/callstats.py
+++ b/tools/callstats.py
@@ -46,7 +46,7 @@ def print_command(cmd_args):
print " ".join(map(fix_for_printing, cmd_args))
-def start_replay_server(args, sites):
+def start_replay_server(args, sites, discard_output=True):
with tempfile.NamedTemporaryFile(prefix='callstats-inject-', suffix='.js',
mode='wt', delete=False) as f:
injection = f.name
@@ -65,8 +65,11 @@ def start_replay_server(args, sites):
]
print "=" * 80
print_command(cmd_args)
- with open(os.devnull, 'w') as null:
- server = subprocess.Popen(cmd_args, stdout=null, stderr=null)
+ if discard_output:
+ with open(os.devnull, 'w') as null:
+ server = subprocess.Popen(cmd_args, stdout=null, stderr=null)
+ else:
+ server = subprocess.Popen(cmd_args)
print "RUNNING REPLAY SERVER: %s with PID=%s" % (args.replay_bin, server.pid)
print "=" * 80
return {'process': server, 'injection': injection}
@@ -292,12 +295,12 @@ 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-calls-stats --allow-natives-syntax'",
+ 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>")
print("- " * 40)
- replay_server = start_replay_server(args, sites)
+ replay_server = start_replay_server(args, sites, discard_output=False)
try:
replay_server['process'].wait()
finally:
« 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