aded k6 and script and updated code with better logic and indexing on schema

This commit is contained in:
krizam
2026-10-22 07:50:26 +05:30
parent 4d937b92da
commit 36a7345d26
17 changed files with 1386 additions and 176 deletions
+23
View File
@@ -0,0 +1,23 @@
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
vus: 1,
iterations: 10,
thresholds: {
http_req_failed: ['rate<0.01'],
http_req_duration: ['p(95)<500'],
},
};
export default function () {
const response = http.get('http://app:3000/users/');
check(response, {
'status is 200': (r) => r.status === 200,
'response is JSON': (r) =>
r.headers['Content-Type']?.includes('application/json'),
});
sleep(1);
}