The Labs / Quality
QualityAdvanced~8h
p99 Load Test with a Latency Budget Gate
A scripted load test that drives realistic concurrent traffic against an API, measures p50/p95/p99 latency and error rate under load, and enforces a hard performance budget as an automated CI gate — proven by intentionally introducing a slow code path and watching the gate fail.
它证明了什么
你可以在面试中捍卫的一句话。
简历亮点
Built an automated p99 latency budget gate (k6 + CI) that load-tests critical API endpoints under realistic concurrency and fails the pipeline on SLO violations, catching a deliberately introduced N+1 query regression before merge.
- can design and run realistic load tests, not just single-request benchmarks
- understands percentile latency vs average latency and why it matters
- turns a performance target into an enforced, automated gate
简介
你逐步构建的内容。
- 01Write a k6 (or equivalent) load test script simulating realistic ramping concurrent users against at least 2 critical endpoints
- 02Capture p50, p95, and p99 latency plus error rate per endpoint from each run
- 03Define an explicit latency budget (e.g. p99 < 300ms, error rate < 1%) as a machine-checked threshold, not a manual read of a dashboard
- 04Fail the CI job with a non-zero exit code and a readable summary when any endpoint exceeds its budget
- 05Produce a human-readable report (HTML or markdown) summarizing latency distribution per run, kept as a build artifact
- 06Demonstrate the gate catching a real regression: introduce a slow path (e.g. N+1 query or added synchronous delay) and show the run go red
证明
当这些通过时,即完成。
Load test run against the healthy baseline passes the budget gate with p99 latency reported under threshold
automated test
Load test run against a deliberately regressed slow path fails the budget gate with a clear per-endpoint breakdown of which threshold was violated
automated test
CI job artifact (HTML/markdown report) showing p50/p95/p99 and error rate for both the passing and failing runs
artifact
Code review confirms the budget thresholds are configurable and the gate logic can't silently pass on a k6 script error
reviewed
技术栈
k6Node.js/Express (or existing API)GitHub ActionsGrafana or k6 HTML report
Sage Method
frame → decide → prove
你将保留
k6 load test suite with a CI-enforced p99 latency budget gate and before/after regression reports