50 lines
1.5 KiB
Markdown
50 lines
1.5 KiB
Markdown
# Scripts k6 — Plan de estrés IPSExtractor
|
||
|
||
Requieren [k6](https://k6.io/docs/get-started/installation/) y el stack en `http://127.0.0.1:8189`.
|
||
|
||
## Entorno de referencia (obligatorio en informes)
|
||
|
||
Las pruebas de carga del proyecto se calibran para el host:
|
||
|
||
- **Hostname:** `ubuntu` (ASUS X441UAK)
|
||
- **SO:** Ubuntu 24.04.4 LTS
|
||
- **CPU / RAM:** i5-7200U, 8 GiB
|
||
- **Docker compartido** con MLflow (~1.8 GiB), Airflow, n8n, MinIO, etc.
|
||
|
||
Antes de cada corrida, adjuntar al informe:
|
||
|
||
```bash
|
||
hostnamectl | head -5
|
||
free -h
|
||
docker stats --no-stream
|
||
curl -s -w '\ntime=%{time_total}s\n' http://127.0.0.1:8189/health/live
|
||
```
|
||
|
||
## Perfiles (`PROFILE`)
|
||
|
||
| Valor | Cuándo |
|
||
|-------|--------|
|
||
| `shared8g` (default) | Host actual con otros contenedores |
|
||
| `lab` | Solo IPSExtractor, ≥3 GiB libres |
|
||
|
||
## Variables
|
||
|
||
| Variable | Default | Descripción |
|
||
|----------|---------|-------------|
|
||
| `BASE_URL` | `http://127.0.0.1:8189` | Gateway |
|
||
| `PROFILE` | `shared8g` | Perfil de carga |
|
||
| `BOT_API_TOKEN` | `dev-token-change-me` | Bearer bot |
|
||
| `DOWNLOAD_JOB_ID` | — | Obligatorio en events |
|
||
| `WORKER_PREFIX` | `load-w` | Prefijo heartbeats |
|
||
| `PDF_B64` | (PDF mínimo) | PDF para count |
|
||
|
||
## Ejecución
|
||
|
||
```bash
|
||
k6 run -e PROFILE=shared8g -e BASE_URL=http://127.0.0.1:8189 k6_gateway_health.js
|
||
k6 run -e PROFILE=shared8g -e BOT_API_TOKEN=dev-token-change-me k6_bot_heartbeats.js
|
||
k6 run -e PROFILE=shared8g -e DOWNLOAD_JOB_ID=<id> k6_bot_events.js
|
||
# Solo si free -h muestra ≥3GiB disponibles:
|
||
k6 run -e PROFILE=shared8g k6_count_batches.js
|
||
```
|