test: 300접속 capacity calibration을 재현 가능하게 구성

비밀값 자동 준비, 4 CPU/8GiB API launcher, fixture 검증 기반 calibration config를 추가한다. tRPC v11 GET input encoding 오류를 고치고 300 SSE/HTTP 실제 실행 절차를 문서화한다.
This commit is contained in:
2026-08-16 18:54:34 +00:00
parent 1a77bb3df1
commit fb3ce3da70
8 changed files with 292 additions and 49 deletions
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -eu
workspace_root=$(CDPATH= cd -- "$(dirname -- "$0")/../../.." && pwd)
secret_env="$workspace_root/tools/load-tests/secrets/capacity.env"
if [ ! -f "$secret_env" ]; then
echo "capacity.env is missing; run the load-test prepare command first" >&2
exit 1
fi
secret_mode=$(stat -c '%a' "$secret_env")
if [ "$secret_mode" != "600" ]; then
echo "capacity.env must have mode 0600" >&2
exit 1
fi
set -a
# shellcheck disable=SC1090
. "$secret_env"
set +a
export GAME_API_ROLE=server
cd "$workspace_root"
exec taskset -c "${CAPACITY_CPUSET:-0-3}" "${CAPACITY_NODE_BINARY:-node}" app/game-api/dist/index.js