bench.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:dramatiq 作者: Bogdanp 项目源码 文件源码
def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--benchmark", help="the benchmark to run",
        type=benchmark_arg, default="latency",
    )
    parser.add_argument(
        "--count", help="the number of messages to benchmark with",
        type=int, default=10000,
    )
    parser.add_argument(
        "--use-green-threads", help="run workers with green threads rather than system threads",
        action="store_true", default=False,
    )
    parser.add_argument(
        "--use-celery", help="run the benchmark under Celery",
        action="store_true", default=False,
    )
    return parser.parse_args()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号