提交 62962e71 编写于 作者: R Ryan Dahl

Fix throughput_benchmark

上级 590feb1c
...@@ -31,7 +31,7 @@ def tcp(deno_exe, megs): ...@@ -31,7 +31,7 @@ def tcp(deno_exe, megs):
echo_server = subprocess.Popen( echo_server = subprocess.Popen(
[deno_exe, "--allow-net", "tests/echo_server.ts", ADDR]) [deno_exe, "--allow-net", "tests/echo_server.ts", ADDR])
time.sleep(1) # wait for deno to wake up. TODO racy. time.sleep(5) # wait for deno to wake up. TODO racy.
try: try:
start = time.time() start = time.time()
cmd = ("head -c %s /dev/zero " % size) + "| nc " + ADDR.replace( cmd = ("head -c %s /dev/zero " % size) + "| nc " + ADDR.replace(
...@@ -50,5 +50,5 @@ if __name__ == '__main__': ...@@ -50,5 +50,5 @@ if __name__ == '__main__':
if not deno_exe or not megs: if not deno_exe or not megs:
print "Usage ./tools/throughput_benchmark.py out/debug/deno 100" print "Usage ./tools/throughput_benchmark.py out/debug/deno 100"
sys.exit(1) sys.exit(1)
secs = tcp_throughput_benchmark(sys.argv[1], megs) secs = tcp(sys.argv[1], megs)
print secs, "seconds" print secs, "seconds"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册