I am getting an error “ERRO[0013] some thresholds have failed”. Only one of the thresholds is displaying time and everything looks the same in all the other the calls. I can log the response times for all of the thresholds that failed in each function. Not sure what the problem is and could use some help.
I have set up thresholds:
//Set TLS version, skip cert verification, and response time thresholds
export const options = {
tlsVersion: 'tls1.2',
insecureSkipTLSVerify: true,
thresholds : {
'http_req_duration{name:"01 Authenticate User"}': ["max>0"],
'http_req_duration{name:"02 Login"}': ["max>0"],
'http_req_duration{name:"03 Get1"}': ["max>0"],
'http_req_duration{name:"04 Post1"}': ["max>0"],
'http_req_duration{name:"05 Post2"}': ["max>0"],
'http_req_duration{name:"08 Post3"}': ["max>0"],
'http_req_duration{name:"07 Post4"}': ["max>0"],
'http_req_duration{name:"06 Put1"}': ["max>0"],
}
};
I am getting an ERRO[0013] some thresholds have failed
Response time logged in function from one of the failed thresholds:
console.log(`Authenticate response time = ${response.timings.duration}`);
INFO[0003] Authenticate response time = 170.59 source=console
Get call for one of the failed threshold:
group("Authenticate User", function() {
const response = http.get('https://#.#.#.#:$/api/auth/v1/authentication/basic', params, {"tags": {"name": "01 Authenticate User"}});
//Log headers
for (const p in response.headers) {
if (response.headers.hasOwnProperty(p)) {
console.log(p + ' : ' + response.headers[p]);
}
};
Terminal output:
checks..............................: 100.00% ✓ 8 ✗ 0
data_received.......................: 202 kB 20 kB/s
data_sent...........................: 197 kB 20 kB/s
group_duration......................: avg=385.11ms min=146.72ms med=387.63ms max=682.62ms p(90)=584.32ms p(95)=633.47ms
http_req_blocked....................: avg=22.27ms min=2µs med=3µs max=178.17ms p(90)=53.45ms p(95)=115.81ms
http_req_connecting.................: avg=6.07ms min=0s med=0s max=48.59ms p(90)=14.57ms p(95)=31.58ms
http_req_duration...................: avg=360.27ms min=137.07ms med=368.91ms max=681.69ms p(90)=583.2ms p(95)=632.45ms
{ expected_response:true }........: avg=360.27ms min=137.07ms med=368.91ms max=681.69ms p(90)=583.2ms p(95)=632.45ms
✗ { name:"01 Authenticate User" }...: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✓ { name:"02 Login" }...............: avg=423.7ms min=423.7ms med=423.7ms max=423.7ms p(90)=423.7ms p(95)=423.7ms
✗ { name:"03 Get1" }................: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✗ { name:"04 Post1" }...............: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✗ { name:"05 Post2" }...............: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✗ { name:"06 Put1" }................: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✗ { name:"07 Post4" }...............: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
✗ { name:"08 Post3" }...............: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_failed.....................: 0.00% ✓ 0 ✗ 8
http_req_receiving..................: avg=21.41ms min=182µs med=308µs max=168.49ms p(90)=51.29ms p(95)=109.89ms
http_req_sending....................: avg=128.25µs min=28µs med=37µs max=457µs p(90)=373µs p(95)=414.99µs
http_req_tls_handshaking............: avg=16.17ms min=0s med=0s max=129.39ms p(90)=38.81ms p(95)=84.1ms
http_req_waiting....................: avg=338.73ms min=136.75ms med=305.51ms max=680.95ms p(90)=582.2ms p(95)=631.58ms
http_reqs...........................: 8 0.793099/s
iteration_duration..................: avg=10.08s min=10.08s med=10.08s max=10.08s p(90)=10.08s p(95)=10.08s
iterations..........................: 1 0.099137/s
vus.................................: 1 min=1 max=1
vus_max.............................: 1 min=1 max=1
ERRO[0013] some thresholds have failed
Call code for successful threshold output:
group("Session Login", function() {
const response = http.post('https://#.#.#.#:#/core/app-session?client=app', params, {"tags": {"name": "02 Login"}});
for (const p in response.headers) {
if (response.headers.hasOwnProperty(p)) {
console.log(p + ' : ' + response.headers[p]);
}
}
console.log(`Session Login response time = ${response.timings.duration}`);
INFO[0004] Session Login response time = 423.708 source=console