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?
请先登录再写评论。
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.
Thank you!