mirror of
https://github.com/django/daphne.git
synced 2025-04-21 17:22:03 +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):
|
||||
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])
|
||||
|
|
Loading…
Reference in New Issue
Block a user