benchwrap

command module
v0.0.0-...-1aa948f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2015 License: MIT Imports: 10 Imported by: 0

README

go get [-u] github.com/tormoder/benchwrap

https://godoc.org/github.com/tormoder/benchwrap

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL