summaryrefslogtreecommitdiff
path: root/tools/http_benchmark.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-10-19 19:15:14 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-10-20 01:19:59 -0400
commit00884d7164ce7322b9e627051b65887f9f2c817d (patch)
treebf645634ae263a338e334a1748d3bb0c1f9d092b /tools/http_benchmark.py
parent09e011b3890af1525f27b788da63b09d8e874604 (diff)
Add rustfmt to third_party.
Diffstat (limited to 'tools/http_benchmark.py')
-rwxr-xr-xtools/http_benchmark.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/http_benchmark.py b/tools/http_benchmark.py
index 58e9c279e..1fc78d31b 100755
--- a/tools/http_benchmark.py
+++ b/tools/http_benchmark.py
@@ -33,12 +33,9 @@ def run(server_cmd):
# Run deno echo server in the background.
server = subprocess.Popen(server_cmd)
time.sleep(5) # wait for server to wake up. TODO racy.
- wrk_platform = {
- "linux2": "linux",
- "darwin": "mac",
- }[sys.platform]
try:
- cmd = "third_party/wrk/" + wrk_platform + "/wrk -d " + DURATION + " http://" + ADDR + "/"
+ cmd = "third_party/wrk/%s/wrk -d %s http://%s/" % (util.platform(),
+ DURATION, ADDR)
print cmd
output = subprocess.check_output(cmd, shell=True)
req_per_sec = util.parse_wrk_output(output)