stats: track proompters over last minute rather than average
This commit is contained in:
parent
06ae8adf0d
commit
3d6ba923bf
|
@ -23,8 +23,12 @@ class SemaphoreCheckerThread(Thread):
|
||||||
def run(self):
|
def run(self):
|
||||||
global proompters_1_min
|
global proompters_1_min
|
||||||
while True:
|
while True:
|
||||||
self.values.append(opts.concurrent_gens - concurrent_semaphore._value)
|
# If the semaphore value is less than the maximum, a prompter has sent a prompt
|
||||||
proompters_1_min = sum(self.values) / len(self.values)
|
if opts.concurrent_gens > self.semaphore._value:
|
||||||
|
self.values.append(1)
|
||||||
|
else:
|
||||||
|
self.values.append(0)
|
||||||
|
proompters_1_min = sum(self.values)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue