# Reading a result

## What a run gives you

| Where | What |
|---|---|
| CLI | a `Done:` line; one line per stage for a run of two or more stages; `Failed requests by step`; `Responses a cache answered`; a comparison with the previous run; `Report:`; and `Next step:`, the testing program's next step with a ready command |
| Report | `report_url` (`GET /reports/<id>`): an HTML report that opens without the key, so it can be shared |
| API | `GET /runs/<id>` returns `summary` (fields below) |

What to tell your user after every run: the rules in https://capacitylab.dev/llms.txt.

## Signals and what to do

| Signal | Meaning | What to do |
|---|---|---|
| A stage is held | errors below 1 % and at least 95 % of its planned iterations started (two iterations of slack for the stage boundary). The report names the last stage held before the first one that was not. Latency is not part of the rule. | Compare that stage's p95/p99 with your user's SLO. Confirm at 70–80 % of it. |
| `failures`: mostly 4xx, redirects or failed checks | The scenario or the target's protection failed (an expired token, a wrong id, a rate limiter), not the load. The report warns about it unless a stage of the staircase held. | The run shows no capacity: tell your user, fix `LOAD/` or the staging setup, smoke again. |
| `failures`: mostly 5xx, timeouts, no response | The target fails under load. | That is the limit, if a smoke run was clean. |
| `cache_hits`: more than half of all responses | A CDN or proxy answered them (its own response header says so), so the run measured the cache, not the backend; its limit is the cache's. The report and `Next step` say so. | Vary the URLs (`capacitylab-load check` lists the steps that repeat, [load-format.md](/docs/load-format.md#81-warnings-a-cache-would-answer-the-run)) or test an address the cache does not serve, then smoke again. The CLI says so after a smoke run too. |
| `dropped > 0` | A scheduled iteration found no free VU: all of them were waiting for responses. | If that stage's p95 jumped, the target slowed down and it is part of its limit. If latency stayed flat, `--max-vus` was too low (VUs needed ≈ rate × iteration time): raise it and run again. |
| `slo_stop` | The run stopped itself at a stage that broke a stop condition. | The report names the last stage that held the SLO: that is the limit within the SLO. The run pays only for the minutes it ran. |
| `target_stop` | The run stopped itself because there was no target to measure: `no_response` (a virtual user got no HTTP response ten times in a row) or `certificate` (a certificate not valid for the name, or a name that resolved to a private address). | The results prove no limit, unless earlier stages of a staircase held: then the target fell over above them. Check that the target is up and that its name, port and certificate are your service's, then smoke again. The run pays only for the minutes it ran. |
| `generator_abort` | The generator cut the run short. | The results are incomplete and prove no limit. The run pays only for the minutes it ran and the operator is notified. Run again; send feedback if it repeats. |
| Comparison marked approximate | The previous run used another `LOAD/` or another schedule. | Compare the limit, not latency. After a profile change the first search is the new baseline. |

## Comparison with the previous run

The report also lists p50/p95/p99 per step and per workflow, next to the baseline's p95 and each one's spread.

Every run is compared with the key's pinned baseline for that target (`capacitylab-load baseline <run_id>` or `--pin-baseline`), else with the last finished run of the same key on the same target, preferring the same `LOAD/`: p50/p95/p99, errors, the actual rate and, for stepped runs, the limit (the last stage that held). `--baseline <run_id>` picks another run for one comparison, for example the last one before a release. The scenario is the same while `LOAD/` keeps its workflows, data and settings: editing run profiles (`runs`) or the README text does not change it. Pin the release you accepted so slower releases do not become the comparison one by one ([ci.md](/docs/ci.md#the-baseline)).

## Summary fields

| Field | Meaning |
|---|---|
| `requests`, `rps_actual`, `duration_s` | HTTP requests sent, their rate, the run's length |
| `business_operations` | workflow iterations completed |
| `setup`, `teardown` | `setup: {ok, step?, status?}`, `teardown: {ok, step?}`; a failed setup means the load and background did not run, and then there is no `teardown` or `background` |
| `background[]`, `background_iterations` | each background workflow beside the load: `workflow`, `iterations`, `requests`, `failed_rate`, `latency_ms.med/p95/p99`, and all their iterations. None of the other fields count background, setup or teardown requests, and `duration_s` excludes setup and teardown time |
| `failed_rate` | failed requests, 0…1 |
| `dropped` | iterations that found no free VU |
| `latency_ms` | `avg`, `min`, `med`, `p90`, `p95`, `p99`, `max` |
| `statuses` | responses by class: `2xx`, `3xx`, `4xx`, `5xx`, `no_response` |
| `response_check_passed` | share of responses whose checks passed |
| `stages[]` | for stepped runs: `id`, `duration_s`, `start_rps`, `target_rps`, `requests`, `business_operations`, `failed_rate`, `latency_ms.med/p95/p99` |
| `failures[]` | failed requests per step: `operation`, `method`, `path`, `requests`, `failed`, `reasons`. A reason is an exact status (`401`, `404`, `429`, `502`, …), the class of a rarer one, `check` (the status was expected but a response check failed), `timeout` or `no_response`. The report's «Ошибки по шагам» table and the CLI say what each usually means. |
| `cache_hits[]` | responses a cache answered per step, by its own header: `operation`, `method`, `path`, `requests`, `hits`, `sources` (`cloudflare` for `cf-cache-status` HIT/STALE/UPDATING, `vercel` for `x-vercel-cache` HIT/STALE/PRERENDER, `cache_status` for an RFC 9211 `Cache-Status` with `hit`, `x_cache` for an `x-cache` with HIT or `TCP_HIT`, `age` for `Age` above 0). Any one of them counts, in this order, since caches stack (Cloudflare in front of Vercel). A cache inside the application (Redis, memoization) sends no such header and is not seen. |
| `slo_stop` | `stage_id`, `breached` |
| `operations[]` | response times per step: `operation`, `method`, `path`, `requests`, `latency_ms.med/p95/p99` |
| `workflows[]` | iteration durations per workflow: `workflow`, `iterations`, `duration_ms.med/p95/p99` |
| `previous` | the run this one is compared with and its numbers, including `operations_p95` and `workflows_p95`; `explicit` for `--baseline`, `pinned` for the pinned baseline |
| `noise` | run-to-run spread of p95 over the last comparable runs (at least 3): `runs`, `p95`, `operations`, `workflows` ([ci.md](/docs/ci.md#noise)) |
| `target_stop` | `reason`: `no_response` or `certificate` |
| `generator_abort` | `exit_code`, `reason` |

## What the measurement is

- HTTP only, from one generator machine in Frankfurt sized to the run (`performance-1x`, `-2x` or `-4x`).
- Measured from the outside: how the application answered, not why. Correlate with your own telemetry: every request carries W3C `traceparent` and `x-capacitylab-load-run-id` ([monitoring-setup.md](/docs/monitoring-setup.md)).
- Redirects are not followed, so they count as 3xx answers.
- Errors and timeouts count toward the error share.

How to write up a result and what to check before blaming the application: [diagnose-result.md](/docs/diagnose-result.md).
