https://github.com/benderscript/go-pprof
Go Programming (GoLang) Pprof Example
https://github.com/benderscript/go-pprof
go golang gorilla mux performance pprof
Last synced: 3 months ago
JSON representation
Go Programming (GoLang) Pprof Example
- Host: GitHub
- URL: https://github.com/benderscript/go-pprof
- Owner: BenderScript
- Created: 2020-11-27T22:46:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-04T17:36:57.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T00:45:35.658Z (6 months ago)
- Topics: go, golang, gorilla, mux, performance, pprof
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO PPROF Example
A forcefully simple example of Gorilla MUX running a simple web server and a Pprof Server.
PProf Server has all endpoints enabled:
* "/"
* "/cmdline"
* "/symbol"
* "/trace"
* "/profile"https://stackoverflow.com/questions/19591065/profiling-go-web-application-built-with-gorillas-mux-with-net-http-pprof
* "/goroutine"
* "/heap"
* "/threadcreate"
* "/block"
* "/vars"## Usage
Simply executing below should do the trick:
```
./docker_run.sh```
Pprof runs on port 15121 and webserver on 15120
## Performance client
I used Apache Benchmark. Some examples in perf.sh
## Dockerfile
I provided two small utilities to build and run the docker containers
## Testing
If everything goes well open your browser and go to:
```
http://localhost:15121/You shoould see: "Pprof!"
http://localhost:15121/
You shoould see: "Go Away!"
```