From ff5debef11992812f39802eb69ccbca1bb49f0e4 Mon Sep 17 00:00:00 2001 From: Kazuki Yamada Date: Tue, 31 Mar 2026 22:24:25 +0900 Subject: [PATCH] chore(cli): Add hyperfine benchmark scripts Add `bench` and `bench-compare` npm scripts for measuring CLI performance with hyperfine. `bench` builds first then runs 10 iterations with 2 warmup runs. `bench-compare` skips the build step for A/B comparisons against a pre-built baseline. Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 15611ad6..83419530 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,8 @@ "repomix-website": "node --run repomix -- --include 'website'", "time-node": "node --run build && time node bin/repomix.cjs", "time-bun": "bun run build && time bun bin/repomix.cjs", + "bench": "node --run build && hyperfine --warmup 2 --runs 10 'node bin/repomix.cjs'", + "bench-compare": "hyperfine --warmup 2 --runs 10 'node bin/repomix.cjs'", "memory-check": "node --run repomix -- --verbose | grep Memory", "memory-check-one-file": "node --run repomix -- --verbose --include 'package.json' | grep Memory", "website": "docker compose -f website/compose.yml build --no-cache && docker compose -f website/compose.yml up",