feat(verification): add k6 load test script and execution guide to README
This commit is contained in:
36
README.md
36
README.md
@@ -42,6 +42,42 @@ Duplicate raw_ids resolved: 20 ✅
|
||||
=====================================
|
||||
```
|
||||
|
||||
### 3. Load Testing (k6)
|
||||
|
||||
A k6 load test script is available at [`scripts/load_test.js`](scripts/load_test.js) to simulate high-concurrency ingestion (ramping up to 50 virtual users pushing sustained load).
|
||||
|
||||
#### Option A: Running with Docker (Recommended)
|
||||
Running k6 via Docker avoids Windows host outbound socket limits:
|
||||
|
||||
- **Windows (PowerShell / Docker Desktop)**:
|
||||
```powershell
|
||||
docker run --rm -v "${PWD}/scripts:/scripts" grafana/k6 run -e API_URL="http://host.docker.internal:8000/api/v1/cdr/raw" /scripts/load_test.js
|
||||
```
|
||||
|
||||
- **Linux / macOS (Host Network)**:
|
||||
```bash
|
||||
docker run --rm -i --network=host grafana/k6 run - <scripts/load_test.js
|
||||
```
|
||||
|
||||
#### Option B: Running with Local k6
|
||||
If k6 is installed on your machine:
|
||||
|
||||
- **Windows (PowerShell)**:
|
||||
```powershell
|
||||
k6 run scripts/load_test.js
|
||||
# Or using explicit path:
|
||||
& "C:\Program Files\k6\k6.exe" run scripts/load_test.js
|
||||
```
|
||||
|
||||
- **Linux / macOS**:
|
||||
```bash
|
||||
k6 run scripts/load_test.js
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> **Windows Ephemeral Port Note**: Under rapid high-concurrency load (>20,000 requests in <60 seconds), Windows may exhaust dynamic outbound ports held in `TIME_WAIT`, throwing `connectex: Only one usage of each socket address is normally permitted`. Running k6 inside Docker (Option A) avoids this host-level limitation.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 2. Architecture & Data Flow
|
||||
|
||||
Reference in New Issue
Block a user