Debugging and Profiling

Back to Languages/go

dlv is a good golang debugger

Profiling and Benchmarking

Profiling is determining which methods are called and for how long.

Benchmarking compares two pieces of code and score each's relative performance.

golang has a built-in profiler. When profiling a go test, you can simply pass additional parameters

view the output with go tool pprof --text cprof, adding output type --text, --web or --list=funcname