Skip to content

chore: add benchmark suite with dashboard#244

Merged
avihut merged 23 commits intomasterfrom
chore/benchmark
Feb 20, 2026
Merged

chore: add benchmark suite with dashboard#244
avihut merged 23 commits intomasterfrom
chore/benchmark

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 20, 2026

Summary

  • Replace the placeholder test:perf task with a comprehensive benchmark suite comparing daft vs equivalent git scripting (with maximum parallelism)
  • Add three-way benchmarks: daft (default) vs daft (gitoxide) vs git
  • 9 benchmark scenarios: init, clone, clone-with-hooks, checkout, checkout-with-hooks, prune, fetch, branch-delete, full-workflow
  • Synthetic repos in 3 sizes (small/medium/large) with automatic fixture generation
  • Results are packaged and pushed to a private daft-benchmarks repo with an Astro dashboard on GitHub Pages
  • CI runs benchmarks on push to master (informational only, never fails builds)

What's included

  • benches/ — benchmark framework, fixtures, and 9+ scenario scripts
  • mise-tasks/bench/ — 13 mise tasks (bench:init, bench:clone, etc.)
  • .github/workflows/bench.yml — CI workflow that runs benchmarks and pushes results to private repo
  • benches/package_results.sh — packages hyperfine JSON into metadata envelopes

Manual setup required

After merging, add a BENCH_REPO_TOKEN repository secret (Settings > Secrets > Actions) with a fine-grained PAT that has Contents write access to avihut/daft-benchmarks.

Test plan

  • bench:init verified (three-way: daft vs daft-gitoxide vs git)
  • bench:clone verified (small/medium/large)
  • bench:checkout verified (existing + new branch, all sizes)
  • Dashboard deploys and renders charts at https://avihut.github.io/daft-benchmarks/

🤖 Generated with Claude Code

avihut and others added 23 commits February 20, 2026 12:06
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add clone.sh and clone_with_hooks.sh that benchmark git-worktree-clone
against manual git clone --bare + worktree add for small/medium/large
repos. The hooks variant tests daft's automatic hook execution vs a
competent manual user replicating hook work with parallelism.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add checkout.sh and checkout_with_hooks.sh that benchmark
git-worktree-checkout and git-worktree-checkout-branch against manual
git worktree add. Tests both existing branch checkout and new branch
creation for small/medium/large repos. The hooks variant tests automatic
hook execution vs parallel manual replication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add four utility command benchmarks:
- init.sh: git-worktree-init vs manual git init --bare + worktree add
- prune.sh: git-worktree-prune vs git worktree prune with 10 stale worktrees
- fetch.sh: git-worktree-fetch --all vs parallel xargs git fetch with 2 remotes
- branch_delete.sh: git-worktree-branch-delete vs manual worktree remove + branch -D

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add workflow_full.sh that benchmarks an end-to-end workflow: clone a
repo then create 3 feature branches. The git side uses maximum
parallelism (& + wait) for worktree creation, giving it every advantage
against daft's sequential execution model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add vs_competition.sh for opt-in competitor benchmarking. Always
compares daft against a shell alias pattern (the most common manual
approach). Optionally benchmarks against git-town if installed. This
scenario is excluded from run_all.sh and must be invoked explicitly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add run_all.sh that runs all benchmark scenarios (except vs_competition)
and aggregates hyperfine markdown results into results/summary.md.
Supports --only <scenario> to run a single benchmark and --list to show
available scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…workflow_full

- Removed unused GIT_HOOK_WORK variable from clone_with_hooks.sh
- workflow_full.sh now uses create_bare_repo_with_hooks and includes:
  - post-clone hook work on the git side
  - worktree-post-create hook work for each branch (parallelized)
  - pruning 2 worktrees at the end (parallelized)
- Git side uses maximum parallelism at every stage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
daft commands operate in the current directory rather than taking
destination paths. Fixed all scenarios to cd into the target directory
before running daft commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove benchmark results from docs/benchmarks/ and benches/history/ since
results will now be pushed to the private daft-benchmarks repo. Update the
CI workflow to package results and push them externally instead of committing
directly to this repo. Clean up VitePress nav/sidebar entries for Benchmarks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avihut avihut added this to the v1.1.0 milestone Feb 20, 2026
@avihut avihut added the docs Documentation changes label Feb 20, 2026
@avihut avihut self-assigned this Feb 20, 2026
@avihut avihut merged commit 00eae07 into master Feb 20, 2026
6 checks passed
@avihut avihut deleted the chore/benchmark branch February 20, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant