基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill load-testing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | load-testing |
| description | Load testing — smoke/load/stress/soak/spike profiles, SLO thresholds, tooling. |
Server-side performance validation: how much traffic the system takes before it degrades, and where it breaks first.
Load for backend, API, or infrastructure work where capacity, concurrency or throughput matter — before a launch, before a traffic event, after an architecture change, or when investigating production saturation.
Boundary with skills/architecture/performance-budgets/SKILL.md:
| Concern | Skill |
|---|---|
| Client-side rendering, Core Web Vitals, bundle size, Lighthouse CI | performance-budgets |
| Server latency under concurrency, throughput, saturation, breaking point | this skill |
They are complementary: a page can hit every Core Web Vitals target at one user and still collapse at a thousand.
Pick the profile from the question being asked. Running the wrong profile answers a question nobody had.
| Profile | Shape | Question answered | Typical duration |
|---|---|---|---|
| Smoke | Minimal load, 1–5 virtual users | Does the script work and the system respond correctly at all? | 1–2 min |
| Load | Ramp to expected peak, hold | Does the system meet its SLOs at normal peak traffic? | 10–30 min |
| Stress | Ramp past peak until degradation | Where is the breaking point, and what breaks first? | 20–60 min |
| Soak (endurance) | Moderate load held for hours | Do leaks, unbounded caches, connection or disk growth appear over time? | 2–24 h |
| Spike | Instant jump to a multiple of peak, then drop | Does the system survive a sudden surge and recover afterwards? | 5–15 min |
| Breakpoint | Slow unbounded ramp | What is the maximum sustainable throughput per instance? | Until failure |
Rules:
Thresholds are not invented for the test — they come from the service's SLOs (skills/architecture/observability-slo/SKILL.md). If no SLO exists, defining one is the first deliverable, not the load test.
p99 < 800ms at 500 concurrent users.| Traffic input | Source |
|---|---|
| Expected peak concurrency | Production analytics — peak hour, not daily average |
| Request mix | Real endpoint distribution from access logs or APM, not an even split |
| Growth headroom | Test at 2× expected peak; capacity planning targets, not wishes |
| Metric | Rule |
|---|---|
| Latency percentiles (p50, p90, p95, p99) | Report percentiles, never averages — an average hides the tail that defines user experience |
| Throughput (req/s, completed iterations/s) | The real capacity number; must be reported alongside the concurrency that produced it |
| Error rate by status and type | Separate 4xx (script/data problem) from 5xx and timeouts (system problem) |
| Saturation | CPU, memory, connection pool usage, queue depth, thread pool, disk I/O, file descriptors |
| Downstream | Database slow queries, lock waits, cache hit ratio, external API latency |
| Client-side saturation | Load generator CPU/network — a saturated generator invents latency that does not exist |
Interpretation rules:
| Pitfall | Consequence | Mitigation |
|---|---|---|
| Same user/record for every virtual user | Unrealistic cache hits and row-level lock contention | Parameterize with a realistic data pool |
| Dataset far smaller than production | Every query hits an in-memory index; results are meaningless | Seed representative volume and cardinality |
| Environment scaled down from production | Results cannot be extrapolated linearly | Match topology, or state the scaling factor explicitly and never extrapolate silently |
| Autoscaling enabled without noting it | Measures the scaler's reaction time, not the system's capacity | Test fixed capacity first, then autoscaling behavior separately |
| Caches/CDN in front absorbing the load | Tests the cache, not the origin | Bypass or vary keys deliberately; test both paths |
| Rate limiters or WAF throttling the generator | 429s reported as system failure | Allowlist the generator, or make throttling part of the scenario |
| Third-party APIs called for real | Cost, bans, and someone else's latency in the results | Stub with realistic latency and error injection |
| Test writes into shared/production data | Data corruption and contaminated analytics | Dedicated tenant/dataset, cleanup routine, never load-test production without written approval |
| Metrics polluting production dashboards | False alerts and paged on-call | Tag all synthetic traffic with a header and exclude it from alerts |
Also budget for think time between requests — real users pause. A no-pause script produces a load pattern that no real population creates.
Gate on the signals already present in the project — a tool the team can read and maintain beats a marginally faster one.
| Signal | Tool |
|---|---|
| JS/TS codebase, CI-first, scriptable scenarios, thresholds as code | k6 |
| Python codebase, custom logic per user, distributed generators | Locust |
| Java/JVM shop, GUI-driven test design, protocol variety (JMS, JDBC, LDAP) | JMeter |
| Scala/Java, high per-node throughput, HTML reports | Gatling |
| Quick sanity check on a single endpoint | hey, wrk, oha, autocannon |
| gRPC services | ghz |
| Cloud-managed distributed runs, no generator infrastructure to operate | Managed service from the existing cloud provider |
| Browser-level load (real rendering, JS execution) | Browser-driver mode of the chosen tool — expensive, use only when protocol-level load cannot answer the question |
Rules:
Every result must state, in one place:
"It handled the load" without the numbers above is not a result.