summaryrefslogtreecommitdiff
path: root/tools/http_benchmark.py
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-07-05 01:15:03 +0200
committerGitHub <noreply@github.com>2020-07-04 19:15:03 -0400
commite4e80f20c2f85cfb9ea1ae1a499ac24fd206f99b (patch)
tree70a327941a09faa64e54dc86b0a0a5df339cf5de /tools/http_benchmark.py
parentd52e4007c887caaa073e43088fd92c3589a41dd5 (diff)
fix(tools): command line args parsing bug, unused function parameter (#6629)
Diffstat (limited to 'tools/http_benchmark.py')
-rwxr-xr-xtools/http_benchmark.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/http_benchmark.py b/tools/http_benchmark.py
index a4576695c..b92ce756e 100755
--- a/tools/http_benchmark.py
+++ b/tools/http_benchmark.py
@@ -14,19 +14,17 @@ import third_party
# "deno_http" was once called "deno_net_http"
DURATION = "20s"
-
-LAST_PORT = 4544
+NEXT_PORT = 4544
def server_addr(port):
return "0.0.0.0:%s" % port
-def get_port(port=None):
- global LAST_PORT
- if port is None:
- port = LAST_PORT
- LAST_PORT = LAST_PORT + 1
+def get_port():
+ global NEXT_PORT
+ port = NEXT_PORT
+ NEXT_PORT += 1
# Return port as str because all usages below are as a str and having it an
# integer just adds complexity.
return str(port)