This is an example application to use tikv/pprof-rs with warp.
Run webserver.
❯ cargo run
The server will start with 3030 port.
Fetch pprof.pb using curl.
❯ curl "http://localhost:3030/debug/pprof/profile?seconds=10" -o pprof.pb
This will take 10 seconds. During this period, send a dummy request runs a loop.
❯ curl "http://localhost:3030/dummy"
Then, visualize pprof.pb using go tool pprof
.
go tool pprof -http=:8080 pprof.pb