I tried the command go test -cpuprofile cpu.out on a GO test file and it resulted in a file cpu.out which is full of many 64 bit numbers. It doesn't make any sense to me. What did the command do and what information can get I extract from cpu.out file?
Similarly go test -memprofile mem.out generated a mem.out file which also seems to make no sense to me. Help me out.
I have attached both the files.
Use the output profiles in coordination with the
go tool
e.g.:I'd recommend some
func Benchmark*(b *testing.B)
implementations for functionality you're interesting in profiling.Once in the tool try
top10
:More information: https://blog.golang.org/profiling-go-programs