Skip to content

fedemagnani/git-bench

Repository files navigation

git-bench

Track and visualize Rust benchmark performance of your repo across commits. Deploys an interactive WASM dashboard to GitHub Pages. A live demo can be found at https://fedemagnani.github.io/git-bench/dev/bench/

image

GitHub Actions

Copy .github/workflows/benchmark-example.yml to your project's .github/workflows/ directory.

Once the run first will be complete, the gh-pages branch should have been created: Go to Settings > Pages > Select 'Deploy From branch' in Source > Select 'gh-page' in branch

Now dashboard should be available at https://<username>.github.io/<repo>/dev/bench/.

Dashboard Features

  • Criterion and libtest support via hierarchical grouping (grandparent::parent::test)
  • FROM/TO commit comparison with metrics table
  • GitHub links for commits and authors

Run locally

To run a local demo of the crate:

# Build and run the demo dashboard locally (dogfooding git-bench on itself)
make demo

This runs the project's own benchmarks and serves the dashboard at http://localhost:8080 (make sure it is not already in use).

CLI Options

Flag Default Description
--output-file required Benchmark output file
--name cargo Suite name
--alert-threshold 200% Regression alert threshold
--fail-on-alert false Exit 1 on regression
--auto-push false Deploy to gh-pages
--dashboard-dir none Dashboard dist path

Credits

Inspired by github-action-benchmark.

License

MIT

About

Git action for benchmark tracking and visualization of rust projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •