mix git_hoox.bench (GitHoox v0.4.2)

Copy Markdown View Source

Run the configured hooks for a stage repeatedly and report timing statistics per hook.

mix git_hoox.bench                      # pre_commit, 5 runs
mix git_hoox.bench --stage pre_push     # different stage
mix git_hoox.bench --runs 20            # more samples
mix git_hoox.bench -s commit-msg -n 3   # short flags

Reads the resolved configuration just like a real hook invocation, so any hook that needs files (e.g. Format filtering on staged Elixir files) needs at least one matching file present for the timing to be meaningful. Hooks that crash count against the errors column but their duration still contributes to the percentiles.