Files
IPSExtractor/docs/plan_pruebas/scripts/README.md
T

50 lines
1.5 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
```