Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Test Assets

Load Testing (Artillery)

Load-test scenarios live in test/test.yml and test/test-behavior.yml and run against the stack in test/ci-compose.yml.

Profiles

  • ci: default CI profile for regression and correctness gates (arrivalRate 2-6 req/s, 40s duration)
  • behavior: feature-behavior profile for SSE reconnect, log routes, and write-path checks
  • stress: higher traffic profile for advisory CI and manual pressure testing

Local commands

From repo root:

./scripts/run-load-test.sh
ARTILLERY_ENV=ci ./scripts/run-load-test.sh
ARTILLERY_FILE=./test/test-behavior.yml ARTILLERY_ENV=behavior ./scripts/run-load-test.sh
ARTILLERY_ENV=stress ./scripts/run-load-test.sh
DD_LOAD_TEST_PORT=3333 ./scripts/run-load-test.sh

Write a JSON report file:

DD_LOAD_TEST_ARTIFACT_DIR=artifacts/load-test/local ./scripts/run-load-test.sh

Summarize a saved JSON report (including status mix + slow endpoints):

./scripts/summarize-load-test-report.sh artifacts/load-test/local/<report>.json "Load Test (Local)"

From e2e/:

npm run load:ci
npm run load:behavior
npm run load:stress

Notes

  • The runner prefers the pinned e2e Artillery install.
  • If not available, it falls back to an explicit pinned npx version.
  • The load-test stack is isolated via a dedicated Compose project name to avoid collisions with other local test stacks.
  • The runner auto-selects a free random host port when DD_LOAD_TEST_PORT is not set.
  • In CI, the workflow enables Buildx + GHA cache to speed repeated image builds.
  • CI uploads Artillery JSON reports as workflow artifacts and posts a short p95/p99/request-rate summary in the job summary.
  • The push CI load-test job performs an enforced regression check against the committed baseline at test/load-test-baselines/ci.json.
  • The behavior profile has an advisory regression check against test/load-test-baselines/behavior.json.
  • The stress profile runs in push CI as an advisory signal with summary, correctness, and artifact upload steps.
  • Regression gate is enforced with both drift and absolute thresholds: p95 <= +20% and <= 1200ms, p99 <= +25% and <= 2500ms, request_rate >= -15% and >= 10 req/s.
  • You can run the same check locally with ./scripts/check-load-test-regression.sh <current.json> <baseline.json>.
  • Correctness checks (5xx, failed VUs, and optional 429 bounds) are handled by ./scripts/check-load-test-correctness.sh <report.json> "<title>".
  • Load-test correctness gates are enforced for the CI profile.