fixed runtime arg for monkey
Former-commit-id: b3e6e1f13b3d24c92d9f7e8441831232f47ff053
This commit is contained in:
parent
ca97f6e454
commit
34d019f483
@ -211,13 +211,14 @@ def stats_thread():
|
||||
global g_exit
|
||||
global runtime
|
||||
i = 0
|
||||
while not g_exit and not (runtime and i > runtime):
|
||||
while not g_exit and not (runtime and i >= runtime):
|
||||
time.sleep(1)
|
||||
print("Ops per second: " + str({k:v for (k,v) in ops.items() if v}))
|
||||
#print(f"Blocked threads: {len(list(filter(lambda x: x.blocked, clients)))}")
|
||||
clear_ops()
|
||||
i += 1
|
||||
g_exit = True
|
||||
asyncore.close_all()
|
||||
|
||||
def flush_db_sync():
|
||||
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
@ -253,7 +254,7 @@ def init_lpush():
|
||||
|
||||
def main(test, flush):
|
||||
global g_exit
|
||||
|
||||
|
||||
clear_ops()
|
||||
|
||||
if flush:
|
||||
@ -272,8 +273,7 @@ def main(test, flush):
|
||||
threading.Thread(target=stats_thread).start()
|
||||
asyncore.loop()
|
||||
g_exit = True
|
||||
sys.exit(0)
|
||||
print("DONE")
|
||||
print("Done.")
|
||||
|
||||
parser = argparse.ArgumentParser(description="Test use cases for KeyDB.")
|
||||
parser.add_argument('test', choices=[x[5:] for x in filter(lambda name: name.startswith("init_"), globals().keys())], help="which test to run")
|
||||
|
Loading…
x
Reference in New Issue
Block a user