in eventdata/schedulers/utilization_scheduler.py [0:0]
def next(self, current):
if self.recording:
now = self.perf_counter()
# skip the very first sample
if self.last_request_start is not None:
UtilizationBasedScheduler.RESPONSE_TIMES.append(now - self.last_request_start)
self.last_request_start = now
# run unthrottled while determining the target utilization
return 0
if self.target_utilization == 1.0:
return 0
else:
# don't let every client send requests at the same time
return current + random.expovariate(1 / self.time_between_requests)