|
hace 5 años | |
---|---|---|
.. | ||
.gitignore | hace 5 años | |
BUILD | hace 5 años | |
LICENSE.txt | hace 5 años | |
README.md | hace 5 años | |
prettybench.go | hace 5 años |
A tool for transforming go test
's benchmark output a bit to make it nicer for humans.
Go benchmarks are great, particularly when used in concert with benchcmp. But the output can be a bit hard to read:
$ go get github.com/cespare/prettybench
$ go test -bench=. | prettybench
Prettybench has to buffer all the rows of output before it can print them (for column formatting), so you
won't see intermediate progress. If you want to see that too, you could tee your output so that you see the
unmodified version as well. If you do this, you'll want to use the prettybench's -no-passthrough
flag so
it doesn't print all the other lines (because then they'd be printed twice):
$ go test -bench=. | tee >(prettybench -no-passthrough)