diff --git a/tests/benchmarks/http.js b/tests/benchmarks/http.js index a73f8d5633..e46157a21f 100644 --- a/tests/benchmarks/http.js +++ b/tests/benchmarks/http.js @@ -1,5 +1,5 @@ import http from 'k6/http'; -import { sleep, check } from 'k6'; +import { check } from 'k6'; import { Counter } from 'k6/metrics'; // A simple counter for http requests @@ -20,10 +20,15 @@ export const options = { }; export default function () { - const res = http.get('http://localhost:9501/v1/health/version?project=console'); + const config = { + headers: { + 'X-Appwrite-Key': '24356eb021863f81eb7dd77c7750304d0464e141cad6e9a8befa1f7d2b066fde190df3dab1e8d2639dbb82ee848da30501424923f4cd80d887ee40ad77ded62763ee489448523f6e39667f290f9a54b2ab8fad131a0bc985e6c0f760015f7f3411e40626c75646bb19d2bb2f7bf2f63130918220a206758cbc48845fd725a695', + 'X-Appwrite-Project': '60479fe35d95d' + }} - const checkRes = check(res, { + const resDb = http.get('http://localhost:9501/v1/health/db', config); + + check(resDb, { 'status is 200': (r) => r.status === 200, - 'response body': (r) => r.body.indexOf('0.7.0') !== -1, }); } \ No newline at end of file diff --git a/tests/benchmarks/ws.js b/tests/benchmarks/ws.js index 4c4c658186..d7bef7ab5f 100644 --- a/tests/benchmarks/ws.js +++ b/tests/benchmarks/ws.js @@ -7,12 +7,12 @@ import { check } from 'k6'; export let options = { stages: [ { - duration: '1m', - target: 250 + duration: '10s', + target: 10 }, { - duration: '1m', - target: 250 + duration: '30m', + target: 10 }, ], }