diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2019-05-03 23:15:16 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-03 17:15:16 -0400 |
commit | f6a9d7d7172df6422f895dcfe6f4267ad1b472da (patch) | |
tree | 086a9e3e75e7597f2d456c26749d9d9d64e51990 /tools/throughput_benchmark.py | |
parent | 36081171323e266760db8bed2f31a6e3be7d8839 (diff) |
add "deno run" subcommand (#2215)
Diffstat (limited to 'tools/throughput_benchmark.py')
-rwxr-xr-x | tools/throughput_benchmark.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/throughput_benchmark.py b/tools/throughput_benchmark.py index 712edfe43..9343d9613 100755 --- a/tools/throughput_benchmark.py +++ b/tools/throughput_benchmark.py @@ -19,7 +19,8 @@ ADDR = "127.0.0.1:4544" def cat(deno_exe, megs): size = megs * MB start = time.time() - cmd = deno_exe + " --allow-read tests/cat.ts /dev/zero | head -c %s " % size + cmd = deno_exe + " run --allow-read " + cmd += "tests/cat.ts /dev/zero | head -c %s " % size print cmd subprocess.check_output(cmd, shell=True) end = time.time() @@ -30,7 +31,7 @@ def tcp(deno_exe, megs): size = megs * MB # Run deno echo server in the background. echo_server = subprocess.Popen( - [deno_exe, "--allow-net", "tests/echo_server.ts", ADDR]) + [deno_exe, "run", "--allow-net", "tests/echo_server.ts", ADDR]) time.sleep(5) # wait for deno to wake up. TODO racy. try: |