qa-perf-design
Skill0 starsChanged 3 months agoMITView on GitHub
当测试工程师需要把需求、NFR 或容量目标翻译成可执行的性能测试方案时使用:设计 负载 load / 压力 stress / 疲劳 endurance(soak) / 尖峰 spike 四类场景,明确并发数、 目标 TPS、爬坡 ramp-up、思考时间 think-time 与 SLA 阈值。触发词:"性能测试方案"、 "压测设计"、"性能场景"、"容量评估"、"并发多少",或在 qa-req-spec / qa-test-analysis 之后使用。 英文触发词(English triggers):performance test design, load testing, stress testing.
In this repository39 other files it gives its agents.
- qa-a11ySkill
- qa-agent-evalSkill
- qa-agent-securitySkill
- qa-api-contractSkill
- qa-api-docSkill
- qa-api-runnerSkill
- qa-archiveSkill
- qa-bug-reportSkill
- qa-bug-verifySkill
- qa-chaosSkill
- qa-ciSkill
- qa-code-reviewSkill
- qa-compat-matrixSkill
- qa-env-configSkill
- qa-executionSkill
- qa-exploratorySkill
- qa-flaky-detectSkill
- qa-mobile-autotestSkill
- qa-mutationSkill
- qa-orchestratorSkill
- qa-perf-analysisSkill
- qa-perf-jmeterSkill
- qa-perf-locustSkill
- qa-release-checkSkill
- qa-reportSkill
- qa-req-specSkill
- qa-risk-basedSkill
- qa-security-reportSkill
- qa-security-scanSkill
- qa-synthetic-monitoringSkill
- qa-test-analysisSkill
- qa-test-case-genSkill
- qa-test-dataSkill
- qa-test-strategySkill
- qa-ui-automationSkill
- qa-ui-kbSkill
- qa-ui-testidSkill
- qa-unit-tddSkill
- qa-visual-regressionSkill
The file
Files
qa-perf-design — 性能测试场景设计
把「需求 / NFR / 容量目标」翻译成一份可执行的性能测试方案: 负载(load)/ 压力(stress)/ 疲劳(endurance/soak)/ spike(尖峰) 四类场景, 明确并发数、目标 TPS、爬坡(ramp-up)、思考时间(think-time)、SLA 阈值。
性能测试不是「把并发开到最大」。先定目标,再定场景,最后才有脚本与结果判定。
何时使用
- 需求或 NFR 里出现「响应时间」「并发」「吞吐」「峰值」「稳定性」等字眼。
- 用户说「性能测试方案」「压测设计」「容量评估」「这个接口扛得住多少」。
- 上线前容量规划、大促保障、接口性能基线建立。
四类场景模型
| 场景类型 | 目的 | 关键参数 | 判定重点 |
| 负载 Load | 验证日常/峰值容量下达标 | 目标并发 + 目标 TPS | 是否达到 SLA |
| 压力 Stress | 找拐点 / 极限 | 逐步加压至失败 | 拐点位置、失败模式 |
| 疲劳 Endurance | 找内存泄漏 / 退化 | 中高负载长时间 | 资源是否持续增长 |
| 尖峰 Spike | 突发流量韧性 | 瞬间 0→峰值→回落 | 能否快速恢复 |
操作流程
步骤 1 — 提取性能目标
从需求 / NFR 中抽取:
- 业务量:日活、峰值 QPS、核心交易笔数。
- SLA:P95 响应时间、错误率上限、TPS 下限。
- 约束:数据量、缓存策略、依赖方限流。
步骤 2 — 设计场景矩阵
按 references/scenario-template.md 填写场景矩阵。每个场景明确:
name / type / users / spawn_rate / duration / think_time / target_tps / sla。
步骤 3 — 生成方案文档
用脚本把场景 JSON 渲染成可读方案(含 SLA 判定口径):
python scripts/gen_perf_plan.py --scenarios scenarios.json --out plan.md步骤 4 — 衔接下游
- 方案交给
qa-perf-locust或qa-perf-jmeter生成脚本(两者共用本技能的 场景 JSON schema,可互换;Locust 偏代码化/CI,JMeter 偏无代码/分布式)。 - 结果交给
qa-perf-analysis(Locust)或qa-perf-jmeter的 analyze 脚本 (JMeter)做吞吐 / 延迟 / 瓶颈判定,口径一致便于横向比较。 - SLA 是否达标进入
qa-report/ 上线评审。
估算速算(给一个起点)
目标并发 ≈ 峰值QPS × 平均响应时间(秒)
例:峰值 1000 QPS,P95=0.5s → 约 500 并发即打满峰值吞吐注意:这只是「刚好打满吞吐」的并发下界;真实压测需在此之上加压找拐点。
深化能力(V2)
- 容量规划计算:
scripts/calc_capacity.py由 峰值QPS × 平均RT × 余量 推导目标并发 与所需 TPS,并给出拐点/饱和识别提示。 - 容量公式、资源监控指标(CPU/内存/连接)、测试清单见
references/checklist.md。
与上下游衔接
- 输入:
qa-req-spec/qa-test-analysis的 NFR 与测试点。 - 输出:
qa-perf-locust(脚本)、qa-perf-analysis(结果)、qa-report(结论)。 - 与 JMeter 路线互通:同 schema 直接喂给
qa-perf-jmeter。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

