Skip to content

A percentile for not default values is undefined in the report #4695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yudintsevegor opened this issue Apr 15, 2025 · 0 comments · May be fixed by #4698
Open

A percentile for not default values is undefined in the report #4695

yudintsevegor opened this issue Apr 15, 2025 · 0 comments · May be fixed by #4698
Assignees

Comments

@yudintsevegor
Copy link

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.

Image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants