Skip to content

Bro Benchmarks

Development-plan item 4.6: performance numbers for the non-functional requirements (internal-docs/requirements-analysis.md Section 8). These are Go benchmarks shipped in the repo — see BenchmarkFullCacheHit and BenchmarkSingleCacheHit in internal/exec/bench_test.go and BenchmarkFingerprint10KFiles in internal/fingerprint/bench_test.go.

Reproduce with:

bash
make bench          # benchtime=1x, same as CI
go test -bench=. -benchtime=5x -run='^$' ./internal/exec/ ./internal/fingerprint/

CI runs the benchmarks on every push (ubuntu-latest, benchtime=1x) and logs the results. They are informational: no timing assertion fails the build, because shared CI runners jitter too much for hard thresholds. Regressions are caught by reviewing these numbers at release time (M5, see internal-docs/benchmark-plan.md Section 6).

Measurement environment

Date2026-08-03
CPU12th Gen Intel(R) Core(TM) i5-12400F
RAM16 GB
OSLinux 6.6.87.2-microsoft-standard-WSL2 (WSL2, amd64)
Gogo1.26.1
Commandgo test -bench=. -benchtime=5x -run='^$' ./internal/exec/ ./internal/fingerprint/

Results

BenchmarkScenarioTargetMeasuredStatus
BenchmarkFullCacheHit50-task linear-chain graph, full exec.Run, all tasks cache hits< 1 s (M5 success criterion 1)23.5 ms/op✅ ~40× under target
BenchmarkSingleCacheHitone cached task incl. fingerprint computation< 50 ms0.73 ms/op✅ ~68× under target
BenchmarkFingerprint10KFiles10,000-file input tree, warm (path, mtime, size) hash cache< 200 ms20.3 ms/op✅ ~10× under target

Notes:

  • BenchmarkFullCacheHit uses a linear chain of 50 tasks — the worst case for scheduling overhead, since no parallelism can hide per-task costs. A wider graph is strictly faster in wall-clock terms.
  • The single-iteration CI run (benchtime=1x) shows the same order of magnitude (24.6 ms / 0.80 ms / 21.6 ms on the same machine).
  • These numbers cover orchestration only (scheduling + fingerprint + cache restore). Real task commands dominate wall time on a cold run and are workload-dependent; competitor comparisons per internal-docs/benchmark-plan.md are an M5 deliverable.

MIT License