Express middleware that exposes pprof endpoints for easy profiling
npm i -S express-pprof-middleware
- Heap
- Wall Time
const pprof = require('express-pprof-middleware');
const app = express();
app.use(pprof);
curl http://localhost:8000/debug/pprof/heap -o heap.pb.gz
curl http://localhost:8000/debug/pprof/wall?seconds=5 -o wall.pb.gz
Full details on the pprof tool here: https://github.com/google/pprof
go install github.com/google/pprof@latest
pprof -web heap.gz
pprof -http=":" heap.gz