51 lines
2.7 KiB
Plaintext
51 lines
2.7 KiB
Plaintext
# Render-benchmark p50 budgets, in microseconds per scenario.
|
|
#
|
|
# Consumed by `zig build bench-render -Doptimize=ReleaseFast -- --check tools/bench-render-budgets.txt`
|
|
# (see tools/bench_render.zig). The check takes the MEDIAN e2e p50 of three
|
|
# full suite passes per scenario and fails if it exceeds the budget here.
|
|
#
|
|
# What these are for: catching order-of-magnitude regressions — an
|
|
# accidental O(n^2) reintroduced in a planner/diff, an extra display-list
|
|
# emission per input, a full-view cost sneaking back into a small-delta
|
|
# path. They are NOT drift detectors: each budget is the healthy p50
|
|
# (median of 3 ReleaseFast runs, Apple Silicon laptop) with ~1.3x headroom
|
|
# and then rounded up generously, so machine noise, thermal state, and a
|
|
# moderately loaded box stay under them. If a legitimate feature raises a
|
|
# scenario's honest cost, re-measure (3+ runs) and raise the budget in the
|
|
# same change, with the reasoning in the commit.
|
|
#
|
|
# Calibration (healthy p50, median of 3): first-frame 4016, keystroke
|
|
# 2064, toggle 6640, scroll 3418, chart-tick 43, doc-edit 1039.
|
|
#
|
|
# first-frame: noisiest scenario (12 iterations, cold caches by design);
|
|
# observed 3971-5010 across healthy runs, so the budget carries extra
|
|
# headroom beyond 1.3x.
|
|
first-frame 7500
|
|
# keystroke-big-view: guards the single-emit input cycle and the keyed
|
|
# plan lookups; the pre-fix quadratic put this at ~6700.
|
|
keystroke-big-view 3000
|
|
# toggle-big-view: guards one-emission-per-click and reconcile cost on a
|
|
# full TEA rebuild; the pre-fix number was ~14700.
|
|
toggle-big-view 9000
|
|
# scroll-transcript: guards the text-layout/glyph-atlas planner indexes on
|
|
# a text-heavy view; the pre-fix number was ~9300.
|
|
scroll-transcript 5000
|
|
# chart-tick: the small-view floor. Absolute headroom (not 1.3x) because
|
|
# tens of microseconds are inside scheduler noise; what this catches is
|
|
# the floor regressing toward O(view-size) cost (any planner/emit
|
|
# regression lands it at several hundred us).
|
|
chart-tick 200
|
|
# markdown-doc-edit: guards markdown re-render + plan cost on a
|
|
# README-sized doc; the pre-fix number was ~2400.
|
|
markdown-doc-edit 1500
|
|
# keystroke-measured-text: guards the batched measure seam and its
|
|
# retained caches on the provider path (a counting synthetic provider
|
|
# stands in for CoreText). Healthy p50 ~540-660 across calibration runs.
|
|
# The scenario ALSO hard-caps two deterministic provider counters per
|
|
# keystroke — per-prefix bytes (healthy 3355, seam disabled 17465,
|
|
# pre-batching hundreds of thousands; cap 8000) and batched calls
|
|
# (healthy 1, a broken cache refetches tens per rebuild; cap 20) — so
|
|
# the regression class trips even when the synthetic provider's cheap
|
|
# engine-side calls keep this time budget green.
|
|
keystroke-measured-text 900
|