@gomani/bench
v0.11.0
Published
The proof-of-thesis benchmark harness: measured shipped-weight + runtime metrics across Gomani and baselines.
Downloads
157
Maintainers
Readme
@gomani/bench
The proof-of-thesis harness: it measures the framework against its own claims with real numbers, and never fabricates — unmeasured metrics are labelled, not invented.
gomani bench # measure the targets in gomani.bench.json → a Markdown report
gomani bench --out RESULTS.md
gomani bench --runtime # also run the browser probe (needs Playwright + a browser)What it measures
- Shipped weight (always, no browser). For each built
dist, the eager JS — the transitive closure of JavaScript reachable by static imports from the page's entry scripts (dynamicimport()— Gomani's islands, or any code-split chunk — is counted as lazy, not eager) — plus HTML and CSS, all as Brotli-compressed wire bytes. Framework-agnostic: it reads thedistof any tool, so Gomani and thebench-baselines/*(React SPA, etc.) are measured identically. This carries H1 (client cost). - Offline shell / PWA (H4). Whether an app-shell service worker + PWA manifest are present.
.gomavs JSX parity. A target may declare"compareTo": "<jsx-twin>"; the report then asserts that target's eager JS ≤ the twin's and prints a.goma-vs-JSX table. Since both surfaces lower to the same runtime, a.gomaport must ship no more client JS than the hand-written JSX of the same app — this measures it (starter-gomaniships a 0 B delta vsstarter).- Runtime (optional, Playwright). DOM-interactive, LCP, JS heap, and actual transfer under throttled
MBD/MBN profiles. Gated: absent a browser, these columns are
—, and the static headline stands.
The report
A Markdown table of shipped weight per target, plus the H1–H9 hypothesis table — with H1 and H4
filled straight from the measurement and the rest labelled by how they are covered (a component's tests,
a process claim, or on-device). See bench-results.md for a committed run.
Sample headline: for the same content, Gomani's
griotships 3.3 KB of eager JS; a React SPA ships 39.3 KB (Brotli).
Programmatic API: measureDist, runBench, formatBenchReport, measureRuntime, HYPOTHESES,
PROFILES.
