Pulse/internal
rcourtman 14d06a1654 test: add soak test with runtime instrumentation (Phase 2 Task 9d)
Add comprehensive soak testing capabilities:

**Runtime Instrumentation:**
- Periodic sampling of heap, stack, goroutines, GC count
- Sample every 10s during harness runs
- HarnessReport includes full RuntimeSamples history
- Detect memory leaks (>10% sustained growth)
- Detect goroutine leaks (>20 leaked goroutines)

**Soak Test:**
- TestAdaptiveSchedulerSoak with 15min+ duration
- Skip unless -soak flag or HARNESS_SOAK_MINUTES set
- 80 synthetic instances (60 healthy, 15 transient, 5 permanent)
- Configurable duration via env var
- Validates: heap growth <10%, goroutines stable, queue depth bounded
- Staleness threshold: 45s for long-running tests

**Wrapper Script:**
- testing-tools/run_adaptive_soak.sh for easy execution
- Accepts duration in minutes: ./run_adaptive_soak.sh 30
- Logs to tmp/adaptive_soak_<timestamp>.log
- Sets proper timeout (duration + 5min buffer)

**Test Results (2-minute validation):**
- 80 instances, 17 samples
- Heap: 2.3MB → 3.1MB (healthy)
- Goroutines: 16 → 6 (no leak, actually decreased)
- Circuit breakers: correctly blocking transient failures

Run with: go test -tags=integration ./internal/monitoring -run TestAdaptiveSchedulerSoak -soak -timeout 20m

Part of Phase 2 Task 9 (Integration/Soak Testing)
2025-10-20 15:13:38 +00:00
..
adapters Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
alerts security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
api feat: add professional logging with runtime configuration and performance optimization 2025-10-20 15:13:38 +00:00
auth Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
config feat: add professional logging with runtime configuration and performance optimization 2025-10-20 15:13:38 +00:00
crypto Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
discovery fix: improve discovery performance and reliability 2025-10-18 22:59:40 +00:00
dockeragent Docker agent: add arch-aware self-update download 2025-10-16 08:43:59 +00:00
errors Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
interfaces Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
logging feat: add professional logging with runtime configuration and performance optimization 2025-10-20 15:13:38 +00:00
mock Adjust backup and snapshot alert handling 2025-10-18 20:11:01 +00:00
models Adjust backup and snapshot alert handling 2025-10-18 20:11:01 +00:00
monitoring test: add soak test with runtime instrumentation (Phase 2 Task 9d) 2025-10-20 15:13:38 +00:00
notifications security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
ssh/knownhosts security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
tempproxy security: add resilience and error handling to tempproxy client 2025-10-19 16:37:11 +00:00
types Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
updates chore: bump version to v4.24.0 2025-10-15 22:26:24 +00:00
utils Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
websocket Fix settings security tab navigation 2025-10-11 23:29:47 +00:00