Preview Updated 2026-05-10

Timing bar

Horizontal request-phase waterfall, one segment per phase.

Basic usage

Data comes in via props; rendered as pure SVG with no third-party charting dependency. Colors come from the --viz-1..8 tokens, colorblind-friendly.

DNS: 12msConnect: 26msTLS: 54msTTFB: 153msDownload: 67msTLS 54msTTFB 153msDownload 67ms
Demo source
src/App.vue vue
<CfTimingBar ... />
src/App.tsx tsx
<CfTimingBar ... />

Real waterfall scenario

Three concurrent HTTP requests with their timings stitched together: DNS / Connect / TLS / Wait / Receive each in its own color.

GET /v1/me · 264ms
DNS: 8msConnect: 24msTLS: 48msWait: 140msReceive: 44msTLS 48msWait 140ms
GET /v1/orders (cached) · 220ms
Wait: 184msReceive: 36msWait 184ms
POST /v1/charges · 480ms
Wait: 412msReceive: 68msWait 412ms
Demo source
src/App.vue vue
<CfTimingBar :phases="phases" />
src/App.tsx tsx
<CfTimingBar phases={phases} />

API

PropTypeDefaultDescription
phasesTimingPhase[]{ label, start, end, colorIndex? }[] (ms)
showAxisbooleantrueBottom segment labels
labelMode'auto' | 'all' | 'none''auto'Segment label strategy; auto hides colliding labels

反馈与讨论

Timing bar · Discussion

0
0 / 600
一键发送
正在加载评论...