Fix QPS: Compare everything in microseconds #317
This commit is contained in:
parent
a977bc97ab
commit
bdeaadf33f
@ -55,7 +55,7 @@ class QPSService:
|
|||||||
|
|
||||||
def retry(self, first_request_time, retry_count):
|
def retry(self, first_request_time, retry_count):
|
||||||
elapsed = datetime.now() - first_request_time
|
elapsed = datetime.now() - first_request_time
|
||||||
if elapsed.microseconds > (self._retry_timeout * 1000.0):
|
if elapsed.microseconds > (self._retry_timeout * 1000.0 * 1000.0):
|
||||||
raise TimeoutException()
|
raise TimeoutException()
|
||||||
|
|
||||||
# inverse qps * (1.5 ^ i) is an increased sleep time of 1.5x per
|
# inverse qps * (1.5 ^ i) is an increased sleep time of 1.5x per
|
||||||
|
Loading…
Reference in New Issue
Block a user