feat(loadtest): added loadtesting with k6

This commit is contained in:
ITQ
2026-02-24 19:47:49 +03:00
parent ade94d35fd
commit f56a26836d
7 changed files with 618 additions and 3 deletions
+9 -1
View File
@@ -81,7 +81,7 @@ Please note that by default containers will use ports 80 (reverse proxy) and ran
#### 1. Configuration
- Docker compose configuration files are stored in [deploy/compose](./deploy/compose).
- Configuration files for containers are stored in [infrastrucutre/configs](./infrastrucutre/configs).
- Configuration files for containers are stored in [infrastructure/configs](./infrastructure/configs).
Env could be customized by creating `.env` file in each service config directory, it will automatically override the default values from `.env.template`.
- Ports on which containers will be accessible are defined in [.env.template](./.env.template). This could be customized by creating `.env` file in the root directory and patching the following lines compose you are running:
@@ -133,3 +133,11 @@ Example run:
![metrics](./assets/images/metrics.png)
System metrics (gc, requests, etc.) and several business metrics (`lotty_decide_requests_total`, `lotty_events_ingested_total`).
## Load testing (k6)
Reproducible k6 profile for `POST /api/v1/decide`:
- scenario script: [infrastructure/k6/decide.js](./infrastructure/k6/decide.js)
- runner: [infrastructure/k6/run-decide.sh](./infrastructure/k6/run-decide.sh)
- guide: [infrastructure/k6/README.md](./infrastructure/k6/README.md)