From 5676f2da49aca2994f93d0ad5156c1dfff858784 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 20 Mar 2016 18:05:29 -0700 Subject: [PATCH] Update benchmarker to work with custom host/port --- testproject/benchmark.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testproject/benchmark.py b/testproject/benchmark.py index a8597aa..e690799 100644 --- a/testproject/benchmark.py +++ b/testproject/benchmark.py @@ -96,9 +96,10 @@ class Benchmarker(object): def spawn_connections(self): if len(stats) >= self.num: return + host, port = self.url.split("://")[1].split(":") for i in range(self.rate): # TODO: Look at URL - reactor.connectTCP("127.0.0.1", 8000, self.factory) + reactor.connectTCP(host, port, self.factory) def print_progress(self): open_protocols = len([x for x in stats.values() if not x])