diff options
author | Bernard Lin <bernardlin12@gmail.com> | 2019-03-24 23:36:27 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-24 23:36:27 -0400 |
commit | 3cc90d9bcf4be58bf88b433ae410f42fa4ad69c7 (patch) | |
tree | 8e92d0266bd71d5c92c2352e943f5b78ef19a097 /tools/http_benchmark.py | |
parent | 129eae0265e3bd93c26c272d253ae9cbc6b88991 (diff) |
Add benchmark for max latency (#1975)
Diffstat (limited to 'tools/http_benchmark.py')
-rwxr-xr-x | tools/http_benchmark.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tools/http_benchmark.py b/tools/http_benchmark.py index 2df5fcb89..bd43a5ec4 100755 --- a/tools/http_benchmark.py +++ b/tools/http_benchmark.py @@ -59,16 +59,18 @@ def hyper_http_benchmark(hyper_hello_exe): def http_benchmark(deno_exe, hyper_hello_exe, core_http_bench_exe): - r = {} + # TODO Rename to "deno_tcp" - r["deno"] = deno_http_benchmark(deno_exe) - r["deno_net_http"] = deno_net_http_benchmark(deno_exe) - r["deno_core_single"] = deno_core_single(core_http_bench_exe) - r["deno_core_multi"] = deno_core_multi(core_http_bench_exe) - r["node"] = node_http_benchmark() - r["node_tcp"] = node_tcp_benchmark() - r["hyper"] = hyper_http_benchmark(hyper_hello_exe) - return r + + return { + "deno": deno_http_benchmark(deno_exe), + "deno_net_http": deno_net_http_benchmark(deno_exe), + "deno_core_single": deno_core_single(core_http_bench_exe), + "deno_core_multi": deno_core_multi(core_http_bench_exe), + "node": node_http_benchmark(), + "node_tcp": node_tcp_benchmark(), + "hyper": hyper_http_benchmark(hyper_hello_exe) + } def run(server_cmd, merge_env=None): @@ -93,9 +95,9 @@ def run(server_cmd, merge_env=None): DURATION, ADDR) print cmd output = subprocess.check_output(cmd, shell=True) - req_per_sec = util.parse_wrk_output(output) + stats = util.parse_wrk_output(output) print output - return req_per_sec + return stats finally: server.kill() |