codingberg / benchgraph

Visualization of Golang benchmark output using Google charts
85 stars 19 forks source link

Not working for Visualize Go app benchmarking #7

Open AntonioSun opened 4 years ago

AntonioSun commented 4 years ago

Coming here from

Visualize Go app benchmarking
https://jtway.co/visualize-go-app-benchmarking-2a3be0169e26

but found even its own sample data is not working.

What I'm missing?

miry commented 4 years ago

Hi @AntonioSun Author of the article https://jtway.co/visualize-go-app-benchmarking-2a3be0169e26 here.

It is a pity, but the tool is not maintained anymore. My experiments was tested against my fork: https://github.com/miry/benchgraph. It has chages from https://github.com/codingberg/benchgraph/pull/4 and https://github.com/codingberg/benchgraph/pull/5.

Here is commands to install:

$ git clone git@github.com:miry/benchgraph.git
$ cd benchgraph
$ go install

After those commands you should have $GOPATH/bin/benchgraph , in my case it is located in ~/go/bin/benchgraph.

UPDATE: You can also install tool via go get -u github.com/miry/benchgraph

Than you can checkout my benchmark tests from https://github.com/miry/samples/tree/master/benchmarks

change your current directory to this folder and run next:

$ go test -bench=. ./... | ~/go/bin/benchgraph 
? goos: linux
? goarch: amd64
? pkg: github.com/miry/samples/benchmarks
√ BenchmarkAccessStructure/Array_1-8          44241926         25.8 ns/op
√ BenchmarkAccessStructure/Hash_1-8           37103576         33.7 ns/op
√ BenchmarkAccessStructure/Array_10-8         45894141         27.1 ns/op
√ BenchmarkAccessStructure/Hash_10-8          27202474         41.5 ns/op
...

√ BenchmarkPrintString/Fprintf_1000000-8             6  187600868 ns/op
? ok   github.com/miry/samples/benchmarks 41.015sWaiting for server response ...
=========================================http://benchgraph.codingberg.com/ig=========================================

You should take attention that only tests marked with green check would be send to the server.

In the end you see the link to the results.

AntonioSun commented 4 years ago

Thanks @miry,

I took the liberty to gather PRs from all different forks and consolidate them into a central location/tool -- https://github.com/AntonioSun/benchgraph#prefix---whats-special-about-this-fork and provide binary releases to all platforms as well.

miry commented 4 years ago

@AntonioSun Nice job 👍