SpitfireLoad Testing & APMWhat's new

Version comparison (A/B)

A comparative run applies one test to two environments at the same time and with the same load, then answers "is B slower than A?". Side A is the baseline (usually the version in production), side B the candidate.

How to run a comparison

  1. Open the test, add two environments with Edit → Environments → Add environment (e.g. test and dev), give each its base address and save.
  2. On the test page press the arrow next to Run → Comparative run.

Run menuRun menu

  1. Pick one environment for Side A · baseline and the other for Side B · candidate.
  2. Optionally type a Version label for each side (e.g. v2.3, v2.4).
  3. Go on to the Equivalence check and wait for the result (at most 15 s).

Comparative run dialogComparative run dialog

  1. Press Start comparison.

  2. When the run ends, read the verdict card: Better, No difference, Worse, Inconclusive or Invalid.

How to prepare the environments

Environments tabEnvironments tab

  1. Edit → Environments → Add environment.
  2. Enter the Environment name and Variables (e.g. base = https://test.example.com).
  3. Pick a Connections mapping if needed.
  4. (Recommended) Fill in Version endpoint (optional) (e.g. {{base}}/version, Where the version is: $.version). Spitfire reads the version label from it.
  5. Save.

Reading the verdict

Comparison resultComparison result

Verdict Meaning
Better At least one step is better, none is worse
No difference Every step is within the acceptable difference
Worse At least one step is worse than the acceptable difference
Inconclusive Not enough data for a verdict; run longer
Invalid A side failed, a runner dropped or a version switch was late

+26% (±4.0%) means: the difference is +26%, and the real difference is most likely between 22% and 30%. The acceptable difference is ±10% for p95 by default.

How to run an A/A calibration

Two environments are never exactly equal. Calibration measures that natural difference and takes it out of later comparisons.

A/A calibration dialogA/A calibration dialog

  1. Make sure both environments run the same version.
  2. The arrow next to Run → Calibrate.
  3. Check versions → Start calibration.
  4. Repeat the calibration every 30 days.

How to compare on one environment

Use the sequential mode when you have a single environment, or when both environments share a database. The sides run in turns: A, B, A, B.

  1. While the environment runs version A, open the comparative run dialog.
  2. Mode → Sequential (taking turns) → start.
  3. When the Waiting for the version switch card shows up, deploy version B.
  4. Press I switched to version B, continue. With a version endpoint, Spitfire sees the switch on its own.

How to compare from CI

  1. Add this command to your CI job:
sh
spitfire cloud run "Checkout flow" --compare A=test,B=dev --label-a v2.3 --label-b "$GIT_SHA"
  1. If the result is worse, the command exits with 98 and the job turns red.

Sequential run on one environment:

bash
spitfire cloud run "Checkout flow" --compare A=test,B=test --compare-mode sequential --label-a v2.3 --label-b "$GIT_SHA" --auto-switch

GitHub Actions and GitLab examples: CI/CD.

How to compare earlier runs

Compare pageCompare page

  1. Load Testing → Compare → Select a test….
  2. Tick 2–6 runs → Select.
  3. Rows that got worse are red; Issues only shows only those.

Details

Topic Value
Load per side Share of the test's load, 50% by default (25% for calibration)
Warm-up 60 s by default, left out of the comparison
Acceptable difference p95 ±10%, error rate ±0.5 points, confidence 95%
Runners Every runner splits its VUs equally between the sides
CI exit codes 0 better or no difference, 98 worse, 97 invalid, 99 B failed a threshold
CI options --strict, --fail-on-inconclusive, --report comparison.pdf, --pr-comment
License Free edition: 1 comparison + 2 calibrations a month; CI and schedules need compare_ci

Common problems

Symptom Fix
"This test has no environments." Add two environments under Edit → Environments.
Equivalence Failed Check the environment's address and that the runner reaches that network.
"These two environments share a database." Press Switch to a sequential comparison.
The result is always Inconclusive Run longer, or run an A/A calibration.
--auto-switch is refused Add a Version endpoint (optional) to the environment.
402 license_limit in CI Start from the web UI, or upgrade the license.
Older runners are refused Runners page → Update.