Skip to content

docs(perf): add footprint benchmark script and performance reference - #1249

Merged
hakula139 merged 3 commits into
mainfrom
docs/add-performance-benchmarks
Dec 6, 2026
Merged

hakula139 merged 3 commits into
mainfrom
docs/add-performance-benchmarks

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

  • Add scripts/bench-footprint.nu to measure stripped release binary size, --version startup latency (median and p95 across 20 runs), --version peak RSS (/usr/bin/time -l on macOS, /usr/bin/time -v on Linux), and interactive PTY idle RSS after initial TUI render, with optional --compare (auto-detecting installed claude, codex, and omp binaries on PATH), --criterion (ox-core and ox-tui Criterion hot paths), and --json flags.
  • Add docs/reference/performance.md with measured numbers on Apple M1 Pro (macOS 27.2.1, rustc 1.100.1), methodology, runtime and packaging context, and reproduction instructions, wired into website/astro.config.ts and docs/README.md.
  • Add concise measured performance callouts linking to the performance reference in README.md and website/src/content/docs/index.mdx.

Key Measurements (Apple M1 Pro, macOS 27.2.1, 2026-12-06)

  • ox (0.2.0-alpha.1): 12.45 MiB stripped binary, 7.14 ms median / 8.27 ms p95 --version startup, 7.13 MiB --version peak RSS, 12.03 MiB idle 120x40 PTY TUI RSS.
  • Comparison CLIs on the same host: claude (2.1.337) 393.29 MiB / 18.56 ms / 20.28 MiB peak RSS, codex (0.174.0) 406.84 MiB / 13.49 ms / 14.06 MiB peak RSS, omp (19.4.4) 239.18 MiB / 16.20 ms / 29.84 MiB peak RSS.
  • Criterion hot paths: render_markdown_incremental_warm 2.33 µs, render_populated_transcript_120x40 171.12 µs, openai_responses_64b_chunks 46.91 µs, anthropic_messages_64b_chunks 66.13 µs, find_cut_point_48_msgs 4.95 µs.

Test plan

  • nix develop -c ./scripts/bench-footprint.nu --compare --criterion collected all CLI footprint, startup, RSS, and Criterion hot-path medians.
  • nix develop -c ./scripts/bench-footprint.nu --runs 3 --json produced valid structured JSON output.
  • nix develop -c run-hooks passed all 21 hooks (including nu-check, cspell, markdownlint-cli2, prettier, dprint, and sort-file-contents).
  • nix develop .#website -c bash -c 'cd website && pnpm run check && pnpm run build' passed with 0 errors and all internal links valid across 30 built pages.

@hakula139 hakula139 added documentation Documentation changes area: tui Touches terminal UI rendering, input, or theming performance Faster or leaner without functional changes area: cli Touches CLI argument parsing, subcommands, or headless execution labels Dec 6, 2026
@hakula139 hakula139 self-assigned this Dec 6, 2026
@codecov

codecov Bot commented Dec 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hakula139
hakula139 merged commit 8c44263 into main Dec 6, 2026
10 checks passed
@hakula139
hakula139 deleted the docs/add-performance-benchmarks branch December 6, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Touches CLI argument parsing, subcommands, or headless execution area: tui Touches terminal UI rendering, input, or theming documentation Documentation changes performance Faster or leaner without functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant