hi there, i would have some question abou K6, i wonder if you can help me .
I was trying to create some data chart,
here is the code :
import {check as k6Check } from "k6";
import { Counter } from 'k6/metrics';
let errors_metrics = new Counter("my_errors");
let success_metrics = new Counter("my_success");
export function check(res, conditionArray, tags) {
let flag = k6Check(res, conditionArray, tags || {});
let tag = {
response: JSON.stringify(res),
check: JSON.stringify(conditionArray)
};
if (flag) {
success_metrics.add(1, tag);
}else {
errors_metrics.add(1, tag);
}
return flag;
}
What am i trying to do is collect conditionArray by using proxy check,
but i found that conditionArray can’t be serialized by JSON.stringify
So,i was wondering if there any way to gain the specific details about failing of the proxy check in K6 ?
or do you have better way to make it so ?