summaryrefslogtreecommitdiff
path: root/tools/http_benchmark.py
diff options
context:
space:
mode:
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)