用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill locust命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | locust |
| description | Locust load testing in Python. Use for load testing. |
Locust is an easy-to-use, scriptable, and scalable performance testing tool. You define the behavior of your users in regular Python code.
from locust import HttpUser, task, between
class WebsiteUser(HttpUser):
wait_time = between(1, 5)
@task
def index(self):
self.client.get("/")
@task(3)
def view_item(self):
item_id = randint(1, 10000)
self.client.get(f"/item?id={item_id}", name="/item")
Run locust -f locustfile.py.
Represents a user. Attributes like wait_time simulate "think time" between actions.
Decorator @task marks methods as user actions. You can weight them (@task(3) runs 3x more often than @task(1)).
Accessible at http://localhost:8089. Allows you to set the user count and spawn rate dynamically.
Do:
FastHttpUser: Locust's standard HttpUser uses requests (slow). FastHttpUser uses geventhttpclient which is much faster for load generation.name argument in client.get(url, name="my-endpoint"). Otherwise, every unique URL (with differing IDs) shows as a separate entry in reports.Don't:
time.sleep) in your tasks, or you pause the whole user runner.