How can we create a configuration for gobench with -benchmem

I can create a gobench configuration. This will allow me to see ns/op. But I would also like to observe memory consumption. In console I would do this:

go test <my_package> -bench . -benchmem

Adding -benchmem to the "Go tool arguments" field of configuration has no effect.

So, how can I add memory consumption to the output of a gobench configuration?

0
2 comments
Official comment

Hi. Use the "Program arguments" field and "-test.benchmem" as argument, then this should work as expected.

You can also use the profiler to analyze the application performance, see our documentation on how to do this.

Avatar
Permanently deleted user

Thank you!

0

Please sign in to leave a comment.