Basic example of CPU Profiling in Golang which shows the bottlenecks and how much time is spent per function
Run the following command to create the cpu.prof file
go test -cpuprofile cpu.prof -bench .=
First connect to pprof by running the command go tool pprof cpu.prof
Then, run the list
command followed by the function name
list nonDivisibleSubset
list generateSubset
list updateSubset