diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-10-20 19:56:16 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-20 19:56:16 -0700 |
commit | 86409eb8369107a4c4944d3db0090ffc79395823 (patch) | |
tree | 20fd27ed9f29769cd09e7daea7343f5c3b162f2c /tools/http_benchmark.py | |
parent | c85311dd7dbad09242633d2ee7a83fdb1cbd1d7f (diff) |
Add Rust hyper http benchmark (#1043)
* Add go net/http benchmark
* Forget about Go. Let's do Rust Hyper
* Update BUILD.gn
* Rename
Diffstat (limited to 'tools/http_benchmark.py')
-rwxr-xr-x | tools/http_benchmark.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/http_benchmark.py b/tools/http_benchmark.py index 1fc78d31b..b90004396 100755 --- a/tools/http_benchmark.py +++ b/tools/http_benchmark.py @@ -16,17 +16,28 @@ def deno_http_benchmark(deno_exe): return run(deno_cmd) -def node_http_benchmark(deno_exe): +def node_http_benchmark(): node_cmd = ["node", "tools/node_http.js", ADDR.split(":")[1]] print "http_benchmark testing NODE." return run(node_cmd) -def http_benchmark(deno_exe): - deno_rps = deno_http_benchmark(deno_exe) - node_rps = node_http_benchmark(deno_exe) +def hyper_http_benchmark(hyper_hello_exe): + hyper_cmd = [hyper_hello_exe, ADDR.split(":")[1]] + print "http_benchmark testing RUST hyper." + return run(hyper_cmd) + - return {"deno": deno_rps, "node": node_rps} +def http_benchmark(deno_exe, hyper_hello_exe): + deno_rps = deno_http_benchmark(deno_exe) + node_rps = node_http_benchmark() + hyper_http_rps = hyper_http_benchmark(hyper_hello_exe) + + return { + "deno": deno_rps, + "node": node_rps, + "hyper": hyper_http_rps + } def run(server_cmd): |