-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Brief summary
Setting thresholds for http_reuqest_duration with NOT the default (p(90), p(95)) will produce undefined in the output.
thresholds: {
// 99.5% of requests should be below 50ms
// 99.99% of requests should be below 100ms
http_req_duration: ["p(99.5)<50", "p(99.99)<100"],
}
However, the threshold works completely fine.
k6 version
k6 v1.0.0-rc1
OS
macOS 15.2 (24C101)
Docker version and image (if applicable)
Steps to reproduce the problem
Setting thresholds for http_reuqest_duration with NOT the default (p(90), p(95)) will produce undefined in the output.
import http from "k6/http";
import { check, sleep } from "k6";
export const options = {
thresholds: {
// 99.5% of requests should be below 50ms
// 99.99% of requests should be below 100ms
http_req_duration: ["p(99.5)<50", "p(99.99)<100", "p(95)<200"],
},
scenarios: {
ping: {
executor: "ramping-arrival-rate",
preAllocatedVUs: 100,
exec: "ping",
stages: [
{ target: 10, duration: "5s" },
{ target: 5, duration: "2s" },
],
},
},
};
export function ping() {
// let res = http.get("http://host.docker.internal:8888/ping");
// let res = http.get("http://localhost:8888/ping");
const res = http.get("https://test.k6.io");
check(res, { kek: (r) => r.status === 202 });
sleep(0.3);
}However, the thresholds work completely fine., the issue lies in output.
Expected behaviour
The expected behaviour would be printing the actual result for provided percentiles.
F.e.
✗ 'p(99.5)<50' p(99.5)=107s
✗ 'p(99.99)<100' p(99.99)=3141692ms
Actual behaviour
The results are undefined:
http_req_duration
✗ 'p(99.5)<50' p(99.5)=undefined
✗ 'p(99.99)<100' p(99.99)=undefined