From 0ef19c907498aa871890ea0bb2dc432547a3abbe Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 20 Mar 2016 19:03:06 -0700 Subject: [PATCH] Don't try and spawn all sockets instantly --- testproject/benchmark.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testproject/benchmark.py b/testproject/benchmark.py index 8ddc3d6..2a0cd54 100644 --- a/testproject/benchmark.py +++ b/testproject/benchmark.py @@ -116,6 +116,8 @@ class Benchmarker(object): max_to_spawn = self.num - len(stats) if max_to_spawn <= 0: return + # Don't spawn too many at once + max_to_spawn = min(max_to_spawn, 10) # Decode connection args host, port = self.url.split("://")[1].split(":") port = int(port)