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:
Executable
+25
@@ -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
|
||||
Reference in New Issue
Block a user