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" )