Documentation
¶
Overview ¶
Benchwrap automates running and analysing Go benchmarks.
Usage:
usage: benchwrap rev.old [rev.new] [rev.more ...]
Benchwrap runs a set of benchmarks n times for one or more git revisions. It feeds the collected benchmark results to `benchstat`, which in turn analyzes the data and prints it to stdout. Each input rev must be a valid git commit or reference, e.g. a hash, tag or branch. Options to `go test` and `benchstat` can be given by using the appropriate flags.
Options:
-bench regexp regexp denoting benchmarks to run (go test -bench) (default ".") -delta-test test forward test to benchstat -delta-test flag -gt-flags string forward quoted string of flags to go test -h-vs-h1 use HEAD~1 as rev.old and HEAD as rev.new -html invoke benchstat with -html flag -n number number of go test invocations per git revision (default 10) -pkgs string packages to test (go test [packages]) (default ".") -v print verbose output to stderr
Dependencies:
go get [-u] rsc.io/benchstat
Example ¶
In a git repository, run all `Foo` benchmarks 10 times each for git tag `v0.42`, commit `cdd48c8a` and branch master, and analyse results with benchstat:
$ benchwrap -n 10 -bench=Foo v0.42 cdd48c8a master
Click to show internal directories.
Click to hide internal directories.