MCPcopy Index your code
hub / github.com/nodejs/node / start_replay_server

Function start_replay_server

deps/v8/tools/callstats.py:51–77  ·  view source on GitHub ↗
(args, sites, discard_output=True)

Source from the content-addressed store, hash-verified

49
50
51def start_replay_server(args, sites, discard_output=True):
52 with tempfile.NamedTemporaryFile(prefix='callstats-inject-', suffix='.js',
53 mode='wt', delete=False) as f:
54 injection = f.name
55 generate_injection(f, sites, args.refresh)
56 http_port = 4080 + args.port_offset
57 https_port = 4443 + args.port_offset
58 cmd_args = [
59 args.replay_bin,
60 "--port=%s" % http_port,
61 "--ssl_port=%s" % https_port,
62 "--no-dns_forwarding",
63 "--use_closest_match",
64 "--no-diff_unknown_requests",
65 "--inject_scripts=deterministic.js,{}".format(injection),
66 args.replay_wpr,
67 ]
68 print("=" * 80)
69 print_command(cmd_args)
70 if discard_output:
71 with open(os.devnull, 'w') as null:
72 server = subprocess.Popen(cmd_args, stdout=null, stderr=null)
73 else:
74 server = subprocess.Popen(cmd_args)
75 print("RUNNING REPLAY SERVER: %s with PID=%s" % (args.replay_bin, server.pid))
76 print("=" * 80)
77 return {'process': server, 'injection': injection}
78
79
80def stop_replay_server(server):

Callers 2

do_runFunction · 0.85
do_run_replay_serverFunction · 0.85

Calls 5

generate_injectionFunction · 0.85
print_commandFunction · 0.85
printFunction · 0.70
formatMethod · 0.65
openFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…