hypcmp

Crates.iohypcmp
lib.rshypcmp
version0.3.2
sourcesrc
created_at2022-09-01 09:55:13.903343
updated_at2022-11-28 15:49:13.602582
descriptionExtension to run hyperfine with toml files w/ commit switches.
homepage
repositoryhttps://github.com/sqsh-project/hypcmp
max_upload_size
id656563
size47,196
Cayoglu (ucyo)

documentation

https://docs.rs/hypcmp

README

MIT license Version Downloads

hypcmp

A way to benchmark applications with hyperfine using a TOML configuration file. This also enables benchmarking across commits using commits = [...] attribute.

Benchmarking across commits is only possible if the git status is clean.

Examples

hyperfine_params = [  # common hyperfine parameters for all runs
    "--runs", "5",
    "--warmup", "3",
    "--style", "none",
]

[run.dd]
command = "dd if=Cargo.toml of=/tmp/Cargo.toml.dd"

[run.cp]
command = "cp Cargo.toml /tmp/Cargo.toml.cp"

[run.rsync]
command = "rsync -a Cargo.toml /tmp/Cargo.toml.rsync"

A more complicated example:

hyperfine_params = [  # common hyperfine parameters for all runs
    "--runs", "5",
    "--warmup", "3",
    "--parameter-list", "ifile", "Cargo.toml,README.md",
    "--parameter-list", "ofile", "/tmp/test.raw",
]

[run.dd]
commits = ["main"] # can be full commit id, an abbreviated id w/ 7 letters, tag or branch
command = "dd if={ifile} of={ofile}"
cleanup = "rm {ofile}"

[run.cp]
command = "cp {ifile} {ofile}"

[run.rsync]
command = "rsync -a {ifile} {ofile}"

Further examples are given in the examples folder.

Commit count: 81

cargo fmt