feat: live timing waterfall with TTFB, DNS, TLS, TCP, sending, receiving
Backend: - Track all k6 HTTP phase metrics via PHASE_MAP in ingestPoint: http_req_blocked (DNS+wait), http_req_connecting, http_req_tls_handshaking, http_req_sending, http_req_waiting (TTFB), http_req_receiving - Compute avg + p95 per phase in computeLiveMetrics, broadcast every second - parseSummary now captures all trend metrics with generic trendRe() Frontend: - Live waterfall bar chart updates every second during the test - Each phase has a distinct colour: indigo/sky/purple/emerald/amber/blue - Bar width = phase avg as % of total request time - TTFB p95 + p99 shown below the waterfall - Bars animate smoothly with CSS transitions - Waterfall resets cleanly on new test start Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -307,6 +307,64 @@ textarea { font-family: var(--mono); resize: vertical; }
|
||||
letter-spacing: .05em;
|
||||
}
|
||||
|
||||
/* ── TIMING WATERFALL ───────────────────────────────────────────────────────── */
|
||||
.waterfall-wrap {
|
||||
margin-top: .75rem;
|
||||
border-top: 1px solid var(--border);
|
||||
padding-top: .9rem;
|
||||
}
|
||||
.waterfall-title {
|
||||
font-size: .78rem;
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .06em;
|
||||
margin-bottom: .6rem;
|
||||
}
|
||||
.wf-hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
|
||||
|
||||
.wf-row {
|
||||
display: grid;
|
||||
grid-template-columns: 120px 1fr 70px;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin-bottom: .35rem;
|
||||
}
|
||||
.wf-label { font-size: .78rem; color: var(--muted); white-space: nowrap; }
|
||||
.wf-bar-wrap {
|
||||
background: var(--border);
|
||||
border-radius: 999px;
|
||||
height: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wf-bar {
|
||||
height: 100%;
|
||||
border-radius: 999px;
|
||||
width: 0%;
|
||||
transition: width .6s cubic-bezier(.4,0,.2,1);
|
||||
}
|
||||
.wf-val { font-size: .78rem; font-family: var(--mono); color: var(--text); text-align: right; }
|
||||
|
||||
/* Phase colours */
|
||||
.wf-blocked { background: #818cf8; } /* indigo — DNS/blocked */
|
||||
.wf-connecting { background: #38bdf8; } /* sky — TCP connect */
|
||||
.wf-tls { background: #a78bfa; } /* purple — TLS */
|
||||
.wf-sending { background: #34d399; } /* emerald — sending */
|
||||
.wf-ttfb { background: #f59e0b; } /* amber — TTFB (most important) */
|
||||
.wf-receiving { background: #60a5fa; } /* blue — receiving */
|
||||
|
||||
.wf-p95-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin-top: .4rem;
|
||||
padding-top: .4rem;
|
||||
border-top: 1px dashed var(--border);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.wf-p95-label { font-size: .72rem; color: var(--muted); }
|
||||
.wf-p95-val { font-size: .85rem; font-weight: 700; font-family: var(--mono); color: var(--yellow); }
|
||||
|
||||
/* ── BANDWIDTH ROW ──────────────────────────────────────────────────────────── */
|
||||
.bw-row {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user