Keep track gevent block number, remove Benchmark from stats plugin
This commit is contained in:
parent
9d048371b7
commit
e8af5db2e8
2 changed files with 6 additions and 357 deletions
File diff suppressed because one or more lines are too long
|
@ -70,13 +70,16 @@ import gevent
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
num_block = 0
|
||||||
def testBlock():
|
def testBlock():
|
||||||
|
global num_block
|
||||||
logging.debug("Gevent block checker started")
|
logging.debug("Gevent block checker started")
|
||||||
last_time = time.time()
|
last_time = time.time()
|
||||||
while 1:
|
while 1:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if time.time() - last_time > 1.1:
|
if time.time() - last_time > 1.1:
|
||||||
logging.debug("Gevent block detected: %s" % (time.time() - last_time - 1))
|
logging.debug("Gevent block detected: %s" % (time.time() - last_time - 1))
|
||||||
|
num_block += 1
|
||||||
last_time = time.time()
|
last_time = time.time()
|
||||||
gevent.spawn(testBlock)
|
gevent.spawn(testBlock)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue