Files
Michael Freno 7b925c89bd Fix 3 Code Review findings on FRE-4574
- P2: Replace wget with curl for ECS health check (Alpine lacks wget)
- P2: Add AWS credentials step to CI terraform-plan job for S3 backend auth
- P3: Remove unused GitHub provider from infra/main.tf

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-10 07:09:39 -04:00
..

ShieldAI Load Tests

k6 load testing suite for ShieldAI services.

Prerequisites

  • k6 v0.45+ installed
  • Target services running on staging environment
  • Authentication tokens for API access

Running Tests

Local Execution

# Run against local development environment
k6 run --env BASE_URL=http://localhost:3000 --env AUTH_TOKEN=dev-token src/darkwatch.js

# Run with results output
k6 run --out json=results.json src/darkwatch.js

CI/CD Execution

# Run on staging environment
k6 run --env BASE_URL=https://staging-api.freno.me --env AUTH_TOKEN=$STAGING_AUTH_TOKEN src/darkwatch.js

Test Configuration

Each test script includes:

  • Stages: Ramp-up, sustained load, ramp-down
  • Thresholds: P99 latency and error rate limits
  • Metrics: Custom metrics for error tracking

Current Thresholds

Service P99 Latency Error Rate
Darkwatch < 200ms < 1%

Metrics Collection

Run with output options:

# JSON output for analysis
k6 run --out json=darkwatch-results.json src/darkwatch.js

# InfluxDB for visualization
k6 run --out influxdb=http://influxdb:8086/k6 src/darkwatch.js

Next Steps

  1. Create load test scripts for Spamshield and Voiceprint
  2. Integrate with GitHub Actions CI pipeline
  3. Set up metrics visualization dashboard
  4. Configure alerting on threshold breaches