A load test that reports numbers requires somebody to interpret them; one that asserts a threshold fails a build.
export const options = {
stages: [
{ duration: '2m', target: 100 },
{ duration: '5m', target: 100 },
{ duration: '2m', target: 0 },
],
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
checks: ['rate>0.99'],
},
}
The ramp shape matters as much as the target: a step straight to a hundred users tests cold-start behaviour and a gradual ramp tests steady state, and they fail differently. The failure-rate threshold is the one that catches a system that stays fast by returning errors, which a duration threshold alone reports as an improvement.