benchmark4.py 文件源码

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

项目:http2 作者: mSOHU 项目源码 文件源码
def benchmark():
    client = SimpleAsyncHTTP2Client(
        host=options.h, port=options.p,
        secure=options.s, max_streams=options.c,
        connect_timeout=5, enable_push=False,
        initial_window_size=2**24-1,
    )

    start = time.time()
    futures = []
    for i in range(options.n):
        futures.append(client.fetch('/'))

    yield futures
    end = time.time()
    raise gen.Return(end - start)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号