https://github.com/hadv/go-pprof
Profiling Go Programs
https://github.com/hadv/go-pprof
Last synced: 5 months ago
JSON representation
Profiling Go Programs
- Host: GitHub
- URL: https://github.com/hadv/go-pprof
- Owner: hadv
- License: mit
- Created: 2019-03-14T02:13:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-16T14:21:39.000Z (about 7 years ago)
- Last Synced: 2024-12-29T20:20:24.946Z (over 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Profiling Go Programs
## Prerequisites
- Install GraphViz
```
$ sudo apt install graphviz
```
## Running CPU profile and export data to file
- Running sample CPU profile
```
$ go run main.go -cpuprofile cpu.prof
```
- Using `go tool pprof` to visualize the CPU profile on `cpu.prof` file
```
$ go tool pprof cpu.prof
$ (pprof) pdf
```