Keep track gevent block number, remove Benchmark from stats plugin

This commit is contained in:
shortcutme 2019-11-19 01:43:39 +01:00
parent 9d048371b7
commit e8af5db2e8
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 357 deletions

File diff suppressed because one or more lines are too long

View File

@ -70,13 +70,16 @@ import gevent
import time
num_block = 0
def testBlock():
global num_block
logging.debug("Gevent block checker started")
last_time = time.time()
while 1:
time.sleep(1)
if time.time() - last_time > 1.1:
logging.debug("Gevent block detected: %s" % (time.time() - last_time - 1))
num_block += 1
last_time = time.time()
gevent.spawn(testBlock)