locust网站压力测试软件

from locust import HttpUser, task, between
from locust.contrib.fasthttp import FastHttpUser  # 如果你使用 FastHttpUser
import json

class WebsiteUser(HttpUser):
    wait_time = between(1, 5)

    @task
    def visit_index(self):
        """访问首页"""
        self.client.get("https://npsy.wxy.work/prod-api/api/sysAuth/loginConfig")


if __name__ == "__main__":
    import os
    os.system("locust --host=https://npsy.wxy.work -u 100000 -r 10000" )

posted @ 2024-09-26 14:18  shiningrise  阅读(12)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css