You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Grafana xk6 to do the writing loading test.
The metrics loki_distributor_lines_received_total exposed by Loki Distributors are not equal to loki_client_lines exposed by xk6.
P.S there is not any error in Loki components
My Javascript
import { check, fail } from 'k6';
import loki from 'k6/x/loki';
const HOST = "localhost:3100";
const TENANT_ID = "my_org_id"
const BASE_URL = `${TENANT_ID}@${HOST}`;
const KB = 1024;
const MB = KB * KB;
const labelCardinality = {
"app": 1,
"namespace": 1,
};
const timeout = 10000; // 10s
const ratio = 0.9; // 90% Protobuf
const conf = new loki.Config(BASE_URL, timeout, ratio, labelCardinality);
const client = new loki.Client(conf);
/**
* Entrypoint for write scenario
*/
export function write() {
let streams = randomInt(10, 10);
let res = client.pushParameterized(streams, 1 * MB, 2 * MB);
check(res,
{
'successful write': (res) => {
let success = res.status === 204;
if (!success) console.log(res.status, res.body);
return success;
},
}
);
}
/**
* Return a random integer between min and max including min and max
*/
function randomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
./k6 run -vus 10 --duration 60s script.js
The text was updated successfully, but these errors were encountered:
I am using Grafana xk6 to do the writing loading test.
The metrics loki_distributor_lines_received_total exposed by Loki Distributors are not equal to loki_client_lines exposed by xk6.
P.S there is not any error in Loki components
My Javascript
The text was updated successfully, but these errors were encountered: