runners.py 文件源码

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

项目:aiolocust 作者: kpidata 项目源码 文件源码
def __init__(self, locust_classes, options):
        self.locust_classes = locust_classes
        self.hatch_rate = options.hatch_rate
        self.num_clients = options.num_clients
        self.num_requests = options.num_requests
        self.host = options.host
        self.locusts = Group()
        self.state = STATE_INIT
        self.hatching_greenlet = None
        self.exceptions = {}
        self.stats = global_stats

        # register listener that resets stats when hatching is complete
        def on_hatch_complete(user_count):
            self.state = STATE_RUNNING
            logger.info("Resetting stats\n")
            self.stats.reset_all()
        events.hatch_complete += on_hatch_complete
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号