go-profile/README.md

18 lines
168 B
Markdown

# Profiling
```
# Compile it
go build
# Test it
go test
# Profile CPU
go test -cpuprofile cpu.prof -bench .
# Visualize profiled data
go tool pprof cpu.prof
```