mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +03:00
Update benchmarker to work with custom host/port
This commit is contained in:
parent
6ed46c7228
commit
5676f2da49
|
@ -96,9 +96,10 @@ class Benchmarker(object):
|
||||||
def spawn_connections(self):
|
def spawn_connections(self):
|
||||||
if len(stats) >= self.num:
|
if len(stats) >= self.num:
|
||||||
return
|
return
|
||||||
|
host, port = self.url.split("://")[1].split(":")
|
||||||
for i in range(self.rate):
|
for i in range(self.rate):
|
||||||
# TODO: Look at URL
|
# TODO: Look at URL
|
||||||
reactor.connectTCP("127.0.0.1", 8000, self.factory)
|
reactor.connectTCP(host, port, self.factory)
|
||||||
|
|
||||||
def print_progress(self):
|
def print_progress(self):
|
||||||
open_protocols = len([x for x in stats.values() if not x])
|
open_protocols = len([x for x in stats.values() if not x])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user