Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: display ops/s #9850

Closed
tj opened this issue Feb 12, 2015 · 9 comments
Closed

testing: display ops/s #9850

tj opened this issue Feb 12, 2015 · 9 comments

Comments

@tj
Copy link

tj commented Feb 12, 2015

Most people obviously feel differently :D but I think it would be nice, even if it's a flag. Almost everything we evaluate is tied back to metrics that are already reported as ops/s in various tools.

@adg
Copy link
Contributor

adg commented Feb 12, 2015

Are you referring to the benchmarks in $GOROOT/test/bench, the testing package's benchmarking feature, or something else?

@minux
Copy link
Member

minux commented Feb 12, 2015 via email

@tj tj changed the title test/bench: display ops/s testing: display ops/s Feb 12, 2015
@tj
Copy link
Author

tj commented Feb 12, 2015

derp, there we go haha. Yeah just the test -bench output. I'm almost always curious what the ops/s are and manually converting over from nano so it gets a little awkward when you do that reasonably often.

@nightlyone
Copy link
Contributor

@tj What about writing a simple wrapper for that and share it in some repository?

See https://github.com/golang/tools/blob/master/benchmark/parse/parse.go on how to parse benchmark output. I guess this parser will be maintained for quite some time, since https://github.com/golang/tools/blob/master/cmd/benchcmp relies on it.

@tj
Copy link
Author

tj commented Feb 12, 2015

@nightlyone hmm I'm not opposed to it, but with the general out-of-the-box experience Go provides it seems a little odd to me.

If we went that route maybe a json output flag makes more sense, so it's not such an ad-hoc format to parse? That would be handy for CI too

@dominikh
Copy link
Member

JSON output might be useful, but in the meantime one can use golang.org/x/tools/benchmark/parse to parse the output and transform it in whatever ways one desires.

@adg
Copy link
Contributor

adg commented Feb 12, 2015

I wouldn't be opposed to a flag to switch the output. cc @robpike

On 13 February 2015 at 08:19, Dominik Honnef notifications@github.com
wrote:

JSON output might be useful, but in the meantime one can use
golang.org/x/tools/benchmark/parse to parse the output and transform it
in whatever ways one desires.


Reply to this email directly or view it on GitHub
#9850 (comment).

@minux
Copy link
Member

minux commented Feb 12, 2015 via email

@tj
Copy link
Author

tj commented Feb 12, 2015

Nice, interfaces would definitely be better in this case, wrapping the exec is pretty extreme for one metric. I'll close this and see if I can get time to get a patch for that other issue

@tj tj closed this as completed Feb 12, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants