> ## Documentation Index
> Fetch the complete documentation index at: https://prescale.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Result JSON schema

> Every prescale run and investigate saves a versioned Result JSON file. Reference for all top-level fields, verdict properties, stage metrics, and route stats.

Every `prescale run` and `prescale investigate` saves a versioned JSON file to `.prescale/runs/<id>.json`. The `prescale run --json` flag emits the same shape to stdout, so the file you get on disk and the JSON you pipe to another tool are always identical. Use `prescale schema` to print the full machine-readable JSON Schema at any time.

***

## Top-level fields

The root object has the following properties. Fields marked **required** must be present on every result; the remaining fields are conditionally present based on which command was run and which options were used.

**schema\_version** `integer` *required*

Always `1`. Additive fields may appear in future releases without bumping this version, so your consumer should ignore unknown properties.

**kind** `string` *required*

`"run"` for a standard `prescale run`, or `"audit"` for a `prescale audit` result.

**id** `string` *required*

The filename stem of the saved result (e.g. `20260628T173648Z`). IDs sort chronologically so `ls .prescale/runs/` gives you results in time order.

**tool\_version** `string` *required*

The version of `prescale` that produced this result (e.g. `"1.1.2"`).

**created\_at** `string` *required*

UTC ISO-8601 timestamp, e.g. `"2026-06-28T17:36:48Z"`.

**warning** `string | null`

A human-readable warning emitted during the run (e.g. robots.txt signal, rate-cap hit), or `null` if everything was clean.

**target** `object` *required*

Describes what was load-tested.

**target properties**

**target.url** `string` *required*

The base URL passed to the command.

**target.host** `string` *required*

The resolved hostname (e.g. `"staging.myapp.com"`).

**target.routes** `string[]` *required*

The list of route paths that were tested (e.g. `["/", "/api/search"]`).

**config** `object` *required*

The exact configuration used for this run. See [config fields](#config-fields) below.

**verdict** `object` *required*

The top-level capacity verdict. See [verdict fields](#verdict-fields) below.

**stages** `Stage[]` *required*

Per-level load metrics. See [stages](#stages) below.

**environment** `object`

Git context captured at run time. Present only when the run was executed inside a git repository.

**environment properties**

**environment.git\_commit** `string | null`

The current commit SHA, or `null` if unavailable.

**environment.git\_branch** `string | null`

The current branch name, or `null` if unavailable.

**fix\_prompt** `string | null`

Present with `investigation`: plain text for a coding agent (Claude Code, Cursor) with where it broke, at how many users, the diagnosis, the evidence and the fixes. Built from the result itself, with no model; never includes response bodies, secrets or credentials from the URL.

**investigation** `object`

Root-cause diagnosis. Present only when `prescale investigate` ran. See [investigation fields](#investigation-fields) below.

**profile** `object`

Launch-scenario framing. Present only when `--profile` was used.

**profile properties**

**profile.name** `string`

The scenario identifier (e.g. `"product-hunt"`).

**profile.label** `string`

Human-readable scenario name (e.g. `"a Product Hunt #1 launch"`).

**profile.peak\_users** `integer`

The concurrent-user peak modelled for this scenario.

**profile.would\_survive** `boolean`

`true` if `survives_users` meets or exceeds `peak_users`.

***

## config fields

The `config` object records every tunable that governed the run. You can reproduce a run exactly by replaying these values as CLI flags.

**config.method** `string` *required*

HTTP method used (e.g. `"GET"`).

**config.max\_users** `integer` *required*

Peak virtual users the ramp targeted.

**config.stage\_seconds** `number` *required*

Seconds held at each load level.

**config.latency\_wall\_s** `number` *required*

p95 latency threshold in seconds. A stage where p95 exceeds this is considered failed.

**config.error\_threshold** `number` *required*

Error-rate threshold (0–1). A stage where the error rate exceeds this is considered failed.

**config.max\_rps** `number | null` *required*

Aggregate requests-per-second ceiling, or `null` if no cap was applied.

**config.warmup** `boolean`

Whether the warmup phase ran before measurement began.

**config.repeat** `integer`

Number of full ramps pooled to tighten the confidence band.

**config.think\_time\_s** `number`

Simulated pause (seconds) each virtual user waited between requests.

**config.replica** `boolean`

`true` when the run tested a local build that PreScale started with `--app` ([replica mode](https://prescale.dev/docs/guides/replica-mode.md)). Absent otherwise. The command itself is never recorded.

**config.fail\_under** `integer | null`

The `--fail-under` gate value, or `null` if no gate was set.

**config.profile** `string | null`

The `--profile` scenario name, or `null` if no profile was used.

***

## verdict fields

The `verdict` object is the single most important part of the result — it summarises what PreScale found.

**verdict.survives\_users** `integer` *required*

The highest concurrent-user level at which the app stayed within both the latency wall and error threshold. This is the headline capacity number.

**verdict.max\_tested** `integer` *required*

The highest user level actually tested during the ramp.

**verdict.onset\_users** `integer | null` *required*

The user level where failure first appeared, or `null` if the app survived all tested levels.

**verdict.onset\_reason** `"errors" | "latency" | null` *required*

Whether the first failure was triggered by the error-rate threshold (`"errors"`) or the latency wall (`"latency"`), or `null` if there was no failure.

**verdict.culprit\_route** `string | null` *required*

The route path that degraded first, or `null` if all routes degraded together or there was no failure.

**verdict.bottleneck** `string | null` *required*

A short plain-English description of the likely failure cause, or `null` if no failure was observed.

**verdict.saturated** `boolean` *required*

`true` if throughput plateaued while virtual users kept rising — a sign the server hit a concurrency ceiling.

**verdict.saturation\_users** `integer | null` *required*

The user level where saturation was first detected, or `null` if saturation was not observed.

**verdict.peak\_rps** `number` *required*

The highest requests-per-second observed across all stages.

**verdict.marginal** `boolean` *required*

`true` if the failure onset is close to `max_tested`, meaning the true ceiling may be higher than tested. Re-run with a larger `-u` value to be sure.

**verdict.confidence** `object`

Statistical confidence band around the `survives_users` estimate.

**confidence properties**

**verdict.confidence.survives\_low** `integer | null`

Lower bound of the confidence interval.

**verdict.confidence.survives\_high** `integer | null`

Upper bound of the confidence interval.

**verdict.confidence.stable** `boolean`

`true` when the band is tight enough to treat the verdict as reliable. `false` when results varied between repeat ramps — consider running with `--repeat 3` to tighten it.

***

## stages

The `stages` array contains one object per tested load level, in ascending order of virtual users.

**stages\[].users** `integer` *required*

Number of concurrent virtual users held at this stage.

**stages\[].rps** `number` *required*

Aggregate requests per second observed during this stage.

**stages\[].p50\_ms** `integer` *required*

Median (p50) response latency in milliseconds across all routes.

**stages\[].p95\_ms** `integer` *required*

95th-percentile response latency in milliseconds across all routes.

**stages\[].p99\_ms** `integer` *required*

99th-percentile response latency in milliseconds across all routes.

**stages\[].error\_rate** `number` *required*

Fraction of requests that returned an error (0–1) at this stage.

**stages\[].errors** `integer` *required*

Absolute error count at this stage.

**stages\[].total** `integer` *required*

Total request count at this stage.

**stages\[].samples** `integer`

Number of latency samples recorded (may differ from `total` when sampling is applied at very high RPS).

**stages\[].routes** `object` *required*

A map of route path → per-route stats. Each value has the same shape: `total`, `errors`, `error_rate`, `rps`, `p50_ms`, `p95_ms`, `p99_ms`.

***

## investigation fields

The `investigation` object is added to the result when you run `prescale investigate`. It contains the root-cause diagnosis for the culprit route.

**investigation.culprit\_route** `string`

The route path that was diagnosed (matches `verdict.culprit_route`).

**investigation.bottleneck\_class** `string`

Machine-readable bottleneck classification (e.g. `"connection_pool"`, `"concurrency_ceiling"`). See [Bottleneck Types](https://prescale.dev/docs/reference/bottleneck-types.md) for the full list.

**investigation.confidence** `"high" | "medium" | "low"`

How confident the classifier is in its diagnosis. `"high"` means the signal was unambiguous; `"low"` means you should re-run with `--repeat 3` for more data.

**investigation.summary** `string`

Plain-English one-sentence diagnosis.

**investigation.evidence** `string[]`

The specific signals that led to this classification — baseline vs loaded latency, static-route probe outcome, error kinds, server header, etc.

**investigation.remediation** `string[]`

Ordered list of concrete fix recommendations, enriched with hints based on detected stack (e.g. gunicorn, nginx, pgbouncer).

**investigation.culprit\_journey** `string | null`

Journey runs only: the journey whose step broke first.

**investigation.culprit\_step** `object | null`

Journey runs only: the step that broke first, as `index` (1-based), `name` and `route`.

**investigation.interference** `object | null`

Journey runs only: set when the journeys ramped together starved the culprit journey. Same shape as `combined.interference`.

**investigation.stack** `object`

Key-value map of detected infrastructure signals — typically `server` (e.g. `"gunicorn/21.2.0"`) and `cdn` (e.g. `"Cloudflare"`). Empty if nothing was detected.

***

## Example

A minimal result for a successful run against a local app:

```json theme={"system"}
{
  "schema_version": 1,
  "kind": "run",
  "id": "20260628T173648Z",
  "tool_version": "1.1.2",
  "created_at": "2026-06-28T17:36:48Z",
  "warning": null,
  "target": {
    "url": "http://localhost:8000",
    "host": "localhost",
    "routes": ["/", "/api/search"]
  },
  "config": {
    "method": "GET",
    "max_users": 200,
    "stage_seconds": 5,
    "latency_wall_s": 2.0,
    "error_threshold": 0.02,
    "max_rps": null,
    "warmup": true,
    "repeat": 1,
    "think_time_s": 0.0,
    "fail_under": null,
    "profile": null
  },
  "verdict": {
    "survives_users": 90,
    "max_tested": 200,
    "onset_users": 150,
    "onset_reason": "errors",
    "culprit_route": "/api/search",
    "bottleneck": "5xx under load while static assets held — the app/backend is the wall.",
    "saturated": false,
    "saturation_users": null,
    "peak_rps": 610,
    "marginal": false,
    "confidence": {
      "survives_low": 75,
      "survives_high": 110,
      "stable": true
    }
  },
  "stages": [
    {
      "users": 10,
      "rps": 520,
      "p50_ms": 18,
      "p95_ms": 31,
      "p99_ms": 44,
      "error_rate": 0.0,
      "errors": 0,
      "total": 2600,
      "samples": 2600,
      "routes": {
        "/api/search": {
          "total": 1300,
          "errors": 0,
          "error_rate": 0.0,
          "rps": 260,
          "p50_ms": 18,
          "p95_ms": 31,
          "p99_ms": 44
        }
      }
    }
  ],
  "environment": {
    "git_commit": "a1b2c3d",
    "git_branch": "main"
  }
}
```

***

> [!TIP]
>
> Run `prescale schema` to print the full JSON Schema in your terminal — useful for validating results programmatically or generating TypeScript types. Add `.prescale/` to your `.gitignore` to keep run artifacts out of source control (except any baseline files you deliberately commit for CI comparison).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.