CI/CD performance gate

Ops integrations

Run a fast perf smoke on every PR: thresholds set the exit code, so a latency or error regression turns the build red. Includes a ready-to-copy GitHub Actions workflow.

Browse all 52 demos 12 categories
Run it
$ loadr run examples/cicd/perf-smoke.yaml
examples/cicd/perf-smoke.yaml
# CI performance gate — the test the GitHub Action runs on every PR.
# Thresholds are the gate: if p95/p99 latency, error rate, or check rate regress
# past these limits, loadr exits non-zero and the CI job goes red.
name: perf-smoke
description: fast PR performance gate

defaults:
  http:
    base_url: "${secrets.target_url}"   # provided by the CI env (TARGET_URL)

secrets:
  target_url: { env: TARGET_URL }

scenarios:
  smoke:
    executor: constant-vus
    vus: 20
    duration: 30s
    flow:
      - request: { name: home, url: /, checks: [ { type: status, equals: 200 } ] }
      - request: { name: health, url: /api/health, checks: [ { type: status, equals: 200 } ] }

thresholds:
  http_req_failed: [ "rate<0.01" ]
  http_req_duration: [ "p(95)<300", "p(99)<800" ]
  checks: [ "rate>0.99" ]

View raw: examples/cicd/perf-smoke.yaml

Related files: cicd/github-actions.yml · cicd/README.md

What it shows

  • Threshold-gated exit code
  • Copy-paste GitHub Actions job
  • Fast enough for every PR