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 g_exit
|
||||||
global runtime
|
global runtime
|
||||||
i = 0
|
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)
|
time.sleep(1)
|
||||||
print("Ops per second: " + str({k:v for (k,v) in ops.items() if v}))
|
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)))}")
|
#print(f"Blocked threads: {len(list(filter(lambda x: x.blocked, clients)))}")
|
||||||
clear_ops()
|
clear_ops()
|
||||||
i += 1
|
i += 1
|
||||||
g_exit = True
|
g_exit = True
|
||||||
|
asyncore.close_all()
|
||||||
|
|
||||||
def flush_db_sync():
|
def flush_db_sync():
|
||||||
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
@ -272,8 +273,7 @@ def main(test, flush):
|
|||||||
threading.Thread(target=stats_thread).start()
|
threading.Thread(target=stats_thread).start()
|
||||||
asyncore.loop()
|
asyncore.loop()
|
||||||
g_exit = True
|
g_exit = True
|
||||||
sys.exit(0)
|
print("Done.")
|
||||||
print("DONE")
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Test use cases for KeyDB.")
|
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")
|
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