MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / main

Function main

monkey/monkey.py:248–266  ·  view source on GitHub ↗
(test, flush)

Source from the content-addressed store, hash-verified

246 handle_del_response(del_client)
247
248def main(test, flush):
249 clear_ops()
250
251 if flush:
252 flush_db_sync()
253
254 try:
255 globals()[f"init_{test}"]()
256 except KeyError:
257 print(f"Test \"{test}\" not found. Exiting...")
258 exit()
259 except ConnectionRefusedError:
260 print("Could not connect to server. Is it running?")
261 print("Exiting...")
262 exit()
263
264 threading.Thread(target=stats_thread).start()
265 asyncore.loop()
266 print("Done.")
267
268parser = argparse.ArgumentParser(description="Test use cases for KeyDB.")
269parser.add_argument('test', choices=[x[5:] for x in filter(lambda name: name.startswith("init_"), globals().keys())], help="which test to run")

Callers 1

monkey.pyFile · 0.70

Calls 5

clear_opsFunction · 0.85
flush_db_syncFunction · 0.85
printFunction · 0.85
ThreadMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected