1.5 KiB
1.5 KiB
Load Tests
Load smoke tests live in e2e/load_test.rb and run through invoke tasks.
The runner creates a realistic group-stage tournament over HTTP, then measures:
- concurrent
GET /tournaments/:idreads at each configured client level - active ActionCable subscriptions to
TournamentChannel, opened in bounded batches so the test measures 200 active sockets instead of only handshake burst capacity /metricswebsocket gauges and process counters after the run
It prints relative timings such as p50, p95, max, and requests per second. The CI goal is not a fixed benchmark. The job fails when requests error, websocket clients cannot subscribe, or ActionCable connection metrics do not reflect the opened clients.
Useful commands:
inv verify-load-testinv load-test --base-url=http://127.0.0.1:3000inv load-test --http-clients=1,10,50,100 --websocket-clients=1,10,50,100,200inv blackbox-load-service
Useful environment overrides:
TURNIERE_LOAD_HTTP_CLIENTS=1,10,50,100TURNIERE_LOAD_WEBSOCKET_CLIENTS=1,10,50,100,200TURNIERE_LOAD_HTTP_REQUESTS_PER_CLIENT=3TURNIERE_LOAD_WEBSOCKET_HOLD_SECONDS=1.0TURNIERE_LOAD_WEBSOCKET_CONNECT_BATCH_SIZE=25TURNIERE_LOAD_GROUP_COUNT=4TURNIERE_LOAD_TEAMS_PER_GROUP=4TURNIERE_LOAD_PLAYOFF_TEAMS=8TURNIERE_LOAD_FORMAT=json
GitLab CI runs rails load smoke against the production image with Postgres,
covering read pressure up to 100 HTTP clients and active websocket pressure up
to 200 clients.