Skip to content

chore(ci): benchmark startup on a large generated fixture - #55

Closed
denolfe wants to merge 2 commits into
mainfrom
ci/bench-large-fixtures
Closed

denolfe wants to merge 2 commits into
mainfrom
ci/bench-large-fixtures

Conversation

@denolfe

@denolfe denolfe commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Extends the PR startup benchmark from one doc to two. test/exhaustive.md stays as the small-doc row; a generated 5k-line fixture adds a row where layout runs to the render cap. Each row gets its own ratio and verdict in the sticky comment.

Key Changes

  • Fixture generated in the job
    • bench/large.md is gitignored, so the workflow runs bench/gen-fixture.ts before hyperfine. The baseline and PR binaries read the same file.
  • Parameterized hyperfine run
    • One invocation with -L doc over both fixtures, baseline command first. hyperfine emits results doc-outer, command-inner, and tags each with parameters.doc.
  • Per-doc comparison
    • bench-compare.ts pairs results by parameters.doc instead of assuming exactly two results. It renders one table row per doc.
    • Any failing row fails the step. A report without parameters still works as a single unnamed pair.

Why no bigger fixture: uncapped --render lays out at most RENDER_MAX_HEIGHT (2000) rows. A 26k-line fixture measured the same 2000-row layout as the 5k-line one plus about 40ms of parse, inside that row's ±40ms noise band. Parse scaling is covered by bench/stages.ts from source.

Generate bench/large.md and bench/huge.md in the bench job and run
hyperfine parameterized over the three docs. bench-compare pairs
baseline/PR results by the doc parameter and renders one row per doc;
any failing row fails the step.
@denolfe denolfe changed the title chore(ci): benchmark startup on large and huge fixtures ci: benchmark startup on large and huge fixtures Sep 6, 2026
Uncapped --render lays out at most RENDER_MAX_HEIGHT rows, so huge.md
measured the same 2000-row layout as large.md plus parse time inside
the noise band.
@denolfe denolfe changed the title ci: benchmark startup on large and huge fixtures chore(ci): benchmark startup on a large generated fixture Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Startup benchmark (--render, linux-x64)

doc baseline (main@3b6d9f2) PR ratio verdict
test/exhaustive.md 360.3ms ± 4.4ms 358.5ms ± 5.1ms 0.99× ✅ ok
bench/large.md 7379.9ms ± 217.3ms 6985.5ms ± 209.0ms 0.95× ✅ ok

Thresholds: warn ≥ 1.1×, fail ≥ 1.25×. Baseline built from main.

@denolfe

denolfe commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

Closing: the extra --render row cannot observe the interactive-path regressions it was meant to guard, and the 2000-row render cap makes it redundant with the existing row. A first-frame/scroll CI bench is the useful follow-up.

@denolfe denolfe closed this Sep 6, 2026
@denolfe
denolfe deleted the ci/bench-large-fixtures branch September 6, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant