分析服务压测结果与性能瓶颈
解读各阶段负载、延迟和错误指标,判断测试结论是否可靠,定位瓶颈证据并提出后续验证测试。
完整提示词
<context>
The user has run a load test and needs to know what it means. Pass criteria: {{pass_criteria}}.
Load test output is easy to misread. Averages hide tail latency; a summary over the whole run mixes ramp-up with steady state; a closed model (fixed virtual users) slows its own request rate when the server slows, hiding saturation (coordinated omission), whereas an open model (arrival rate) shows it; and the load generator itself often saturates first (CPU, network, ephemeral ports, connection limits), producing a fake ceiling. Errors also need reading: a 0% error rate with p99 at the client timeout means requests were not failing, they were waiting.
</context>
<task>
<results>
{{results}}
</results>
1. Check validity first: the test model (open or closed), whether a steady state was reached at each stage and held long enough (several minutes), whether the load generator was saturated (its CPU above about 80%, dropped iterations, k6 `dropped_iterations`, JMeter or Locust warnings), whether the target environment and data volume resemble production, and whether caches were warm. Say what the validity problems mean for the conclusions.
2. Build the load-versus-latency picture per stage: offered load, achieved throughput, p50, p95, p99, error rate. Find the knee: the load where p95 or p99 starts rising faster than load, or achieved throughput stops tracking offered load. Use Little's law (concurrency = throughput × latency) as a sanity check on reported numbers.
3. Separate client limits from server saturation, and locate the server bottleneck using utilisation, saturation and errors per resource (USE method): CPU, memory and GC, thread or worker pools, database connections and slow queries, locks, downstream services, rate limits, and network. Tie each conclusion to a metric in the input; where server metrics are missing, say which to collect.
4. Read errors by type and time: timeouts, 5xx, connection resets, 429s; whether they start at the knee.
5. Judge each pass criterion as pass, fail or cannot tell, with the number. If criteria were not given, propose ones tied to the service's needs and label them proposed.
6. Recommend the next tests: re-run with fixes, a test to confirm the suspected bottleneck (for example double the connection pool and see if the knee moves), a soak test for leaks, or a spike test; and what to change in the test itself.
</task>
<constraints>
- Quote the numbers you use from the input; do not invent metrics.
- Never call a test passed when its validity is in doubt; say "cannot tell" and why.
- Distinguish evidence from hypothesis for each bottleneck.
{{> output/uncertainty}}
</constraints>
<output_format>
## Verdict
Table: criterion | threshold | measured | pass, fail or cannot tell. Then one sentence on capacity: the highest load that met the criteria.
## Validity of the test
Bullets, each with its effect on the conclusions.
## Where it breaks
Table: stage | offered load | throughput | p50 | p95 | p99 | errors. Then the knee and how it was found.
## Bottleneck evidence
Ranked list: resource, evidence, confidence.
## Next tests
Numbered, each with the question it answers.
## Questions
Missing data that would change the conclusions.
</output_format>可替换内容
- {{pass_criteria}}
- {{results}}
- {{> output/uncertainty}}
分类与标签
编程开发、性能测试、负载分析、延迟诊断、服务容量