def set_current_config(config): global _CONFIG _CONFIG = config log.quiet = config["quiet"] if config["trace_mongodb"] or config["print_mongodb"]: from mrq.monkey import patch_pymongo patch_pymongo(config) if not config["no_import_patch"]: from mrq.monkey import patch_import patch_import()
def set_current_config(config): _GLOBAL_CONTEXT["config"] = config log.quiet = config["quiet"] if config["add_network_latency"] != "0" and config["add_network_latency"]: from mrq.monkey import patch_network_latency patch_network_latency(config["add_network_latency"]) if config["print_mongodb"] or config["trace_io"]: from mrq.monkey import patch_pymongo patch_pymongo(config) if config["trace_io"]: from mrq.monkey import patch_io_all patch_io_all() if not config["no_import_patch"]: from mrq.monkey import patch_import patch_import()
def set_current_config(config): _GLOBAL_CONTEXT["config"] = config log.quiet = config["quiet"] if config["add_network_latency"] != "0" and config["add_network_latency"]: from mrq.monkey import patch_network_latency patch_network_latency(config["add_network_latency"]) if config["print_mongodb"] or config["trace_io"]: from mrq.monkey import patch_pymongo patch_pymongo(config) if config["trace_io"]: from mrq.monkey import patch_io_all patch_io_all() if not config["no_import_patch"]: from mrq.monkey import patch_import patch_import() if config["mongodb_logs"] == "0": log.handler.collection = False