Caliper — time to first painted output
Verdict
People waited 1514 ms for the first word in the one warm run.
- In the browser: headers → first paint — 5.8× its limit, in 1 of 1 warm runs.
- Inside the server: postgres — 5.1× its limit, in 1 of 1 marked visits.
Advice
The first run (a fresh browser) waited 132 ms longer for the first word than the one warm run (1646 vs 1514 ms).
why
CORS preflight: 183 ms on the first run, not in the warm runs (+183 ms, more than its 100 ms limit). Caliper can't tell why from timings alone.
Basis: Caliper's own reasoning: each segment's Where-to-look limit, applied to the gap between the first run and the warm runs, from 1 first run and 1 warm run. 100 ms: Nielsen / RAIL: under 100 ms feels instant.
article is 55% of the prompt (3207 of 5827 bytes, labelled user).
why
Basis: Caliper's own threshold: one named part is 50% or more of the prompt's measured bytes, more than all the rest together. These are bytes your app reported, not tokens; Caliper didn't measure what trimming it would change.
In the browser
Where to look — browser
1 warm run.
headers → first paint: 585 ms — 5.8× its 100 ms limit, in 1 of 1 warm runs; 39% of the browser total
Limit: Nielsen / RAIL: under 100 ms feels instant. These limits were written for whole pages or interactions; applying them to one part of the wait is Caliper's reasoning.
Things to check:
- could be headers sent before the first real chunk, so the wait for the reply shows up here
- could be the client buffering chunks before showing them
- could be a proxy or compression buffering the stream
- could be parsing or rendering each chunk
Learn more: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
Caliper sees timings, not your code — these are common causes, not a diagnosis.
Also over their limits
- browser: response headers received: 926 ms — 1.5× its 600 ms limit, in 1 of 1 warm runs — learn more: https://web.dev/optimize-ttfb/
Inside the server
From separate marked runs, on the server's clock. Never added to the browser timings above: different runs, different clocks.
Empty parts of a row are time no span covers.
Request Map — what's inside each AI request (sizes only)
Prompt sizes (marked visit 1)
UTF-8 bytes of each message's text as your app passed it to run.prompt(); not tokens.
Source: who wrote the text, as your app labelled it.
- app (your own text)
- user (the person using the feature)
- outside (anyone else)
- unknown (not labelled)
| message | bytes | share | source |
|---|---|---|---|
| 1 system | 2499 | 43% | |
| instructions | 2499 | app labelled by app | |
| rest of message 1 | 0 | unknown not labelled | |
| 2 user | 3328 | 57% | |
| author | 25 | user labelled by app | |
| title | 33 | user labelled by app | |
| code_snippet | 57 | app labelled by app | |
| article | 3207 | user labelled by app | |
| rest of message 2 | 6 | unknown not labelled | |
| total | 5827 | ||
| by source: app | 2556 | 44% | app |
| by source: user | 3265 | 56% | user |
| by source: outside | 0 | 0% | outside |
| by source: unknown | 6 | 0% | unknown |
Where to look — server
1 marked visit, on the server's clock; never compared with the browser.
postgres: 506 ms — 5.1× its 100 ms limit, in 1 of 1 marked visits; 48% of the time to server: first bytes sent
a step your app named; Caliper can't see inside it.
It ended before the model call was sent (postgresEnd 506 ms, model call sent 506 ms), so all 506 ms of it came before the model call.
Limit: Nielsen / RAIL: under 100 ms feels instant. These limits were written for whole pages or interactions; applying them to one part of the wait is Caliper's reasoning.
Things to check:
- could be waiting inside this step: network calls, other services, locks
- could be work that runs on every request but could be cached or done earlier
- could be steps running one after another that could run at the same time
Caliper sees timings, not your code — these are common causes, not a diagnosis.
Also over their limits
- model call → first bytes sent: 540 ms — 1.2× its 450 ms limit, in 1 of 1 marked visits
Checks
- ✓streaming Streams — streaming span 3268 ms (the one warm run).
- ✓stop Stop works (browser side)
Stop check
Stop button /^stop$/i, one extra run on a fresh page
Stop works (browser side)
| pixels | ✓ pass | output stopped changing 0 ms after Stop |
|---|---|---|
| network | ✓ pass | POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate: aborted by the browser (net::ERR_ABORTED) 15 ms after Stop; 0 bytes after the abort |
| end | ✓ pass | no normal end (no requestfinished) |
- clicked Stop 651 ms after the first word, while the output was still changing
- Model-side cancellation (hop 2: your server → the model provider) is not visible from the browser. An abort here only shows the browser dropped its connection; check server logs or provider usage to confirm generation stopped.
Details: every run, the data, request matching, server marks
Timeline per run
- click → fetch() called / request sent
- CORS preflight
- browser: response headers received
- headers → first paint (streaming)
POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 · text/event-stream
chosen from 9 request(s): explains 84 of 85 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any
share: 84 of 84 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source)
POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 · text/event-stream
chosen from 8 request(s): explains 67 of 68 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any
share: 67 of 67 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source)
Data
| Segment (ms) | run 1 (cold) | run 2 |
|---|---|---|
| Total | 1,646 | 1,514 |
| click → fetch() called / request sent | 4.8 | 2.6 |
| CORS preflight | 182.7 | — |
| browser: response headers received | 1182.4 | 926.1 |
| headers → first paint (streaming) | 276.3done 5007 ms after paint | 585.2done 3267 ms after paint |
Request matching and clock check
- run 1 (cold) POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 text/event-stream chosen from 9 request(s): explains 84 of 85 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any share: 84 of 84 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source) clock check: response headers within 0.1 ms of Resource Timing
- run 2 POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate → 200 text/event-stream chosen from 8 request(s): explains 67 of 68 output changes (body bytes ≤ 250 ms before each; 1 came before its first body byte), no other request explains any share: 67 of 67 output changes from its first body byte (100%) — the first run asks below 95% (Caliper's own threshold, no outside source) clock check: response headers within 0.5 ms of Resource Timing
Inside the server: marks and spans
From separate marked runs, on the server's clock. Never added to the browser timings above: different runs, different clocks.
Inside the server (from 1 of 1 marked run) — ms after the request arrived, status 200
| ms | |
|---|---|
| Marks | |
| postgresStart | 0 |
| postgresEnd | 506 |
| model call sent | 506 |
| server: first bytes sent | 1046 |
| Spans | |
| postgrespostgresStart → postgresEnd | 506 |
| model call → first bytes sent | 540 |
- Workers time waits only — a span with only computation inside (no I/O) can read 0 ms.
- first bytes sent = the server's first write to the browser. If your app writes anything before the model's reply (a heartbeat, an envelope), this is that write.
Run details
- Server timings — pre-check: feature on, token accepted (expected 400 on the test id caliper.precheck)
- Server timings — marked visit 1 of 1 sent x-caliper-run 94005205-e033-44d7-88fc-46c49ea32482 on POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate (matched POST https://quill-backend.example/api/v1/social/cmvhv3jo80002f4y47l8p1adb/generate)