fix(make): Create tests/bin directory for CPU profiling output

Add @mkdir -p tests/bin to profile-load, profile-load-norate, and profile-ws-queue targets

Fixes 'no such file or directory' error when writing CPU profile files
This commit is contained in:
Jeremie Fraeys 2026-02-23 14:31:08 -05:00
parent 7d1ba75092
commit 551e6d4dbc
No known key found for this signature in database

View file

@ -325,17 +325,20 @@ load-test:
# CPU profiling for HTTP LoadTestSuite (MediumLoad only for speed)
profile-load:
@echo "CPU profiling MediumLoad HTTP load test..."
@mkdir -p tests/bin
go test ./tests/load -run TestLoadProfile_Medium -count=1 -cpuprofile tests/bin/cpu_load.out
@echo "${OK} CPU profile written to cpu_load.out (inspect with: go tool pprof tests/bin/cpu_load.out)"
profile-load-norate:
@echo "CPU profiling MediumLoad HTTP load test (no rate limiting)..."
@mkdir -p tests/bin
go test ./tests/load -run TestLoadProfile_Medium -count=1 -cpuprofile tests/bin/cpu_load.out -v -args -profile-norate
@echo "${OK} CPU profile written to cpu_load.out (inspect with: go tool pprof tests/bin/cpu_load.out)"
# CPU profiling for WebSocket → Redis queue → worker path
profile-ws-queue:
@echo "CPU profiling WebSocket queue integration test..."
@mkdir -p tests/bin
go test ./tests/integration -run WebSocketQueue -count=5 -cpuprofile tests/bin/cpu_ws.out
@echo "${OK} CPU profile written to cpu_ws.out (inspect with: go tool pprof tests/bin/cpu_ws.out)"