Skip to content

A small CLI to parse the output of go test -bench and output to CSV.

License

Notifications You must be signed in to change notification settings

bryanhuhta/go-bench2csv

 
 

Repository files navigation

go-bench2csv

A small CLI to parse the output of go test -bench and output to CSV.

It passes the go test output verbatim on STDERR and the CSV output to STDOUT.

Usage

demo.gif

$ go install github.com/maragudk/go-bench2csv/cmd/bench2csv@latest
$ go test -cpu 1,2,4,8 -bench . | bench2csv >benchmark.csv
goos: darwin
goarch: arm64
pkg: github.com/maragudk/go-bench2csv
BenchmarkProcess/in_parallel_just_for_fun           	    4314	    276820 ns/op
BenchmarkProcess/in_parallel_just_for_fun-2         	    8292	    145504 ns/op
BenchmarkProcess/in_parallel_just_for_fun-4         	   15826	     75832 ns/op
BenchmarkProcess/in_parallel_just_for_fun-8         	   19111	     73122 ns/op
PASS
ok  	github.com/maragudk/go-bench2csv	7.324s

Made in 🇩🇰 by maragu, maker of online Go courses.

About

A small CLI to parse the output of go test -bench and output to CSV.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.4%
  • Makefile 6.6%