0.0.8 • Published 1 year ago

express-pprof-middleware v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

express-pprof-middleware

Express middleware that exposes pprof endpoints for easy profiling

Installation

npm i -S express-pprof-middleware

Supported Profiles

  • Heap
  • Wall Time

Usage

const pprof = require('express-pprof-middleware');

const app = express();
app.use(pprof);

Getting a heap profile:

curl http://localhost:8000/debug/pprof/heap -o heap.pb.gz

Getting a wall time profile:

curl http://localhost:8000/debug/pprof/wall?seconds=5 -o wall.pb.gz

Viewing Profiles

Full details on the pprof tool here: https://github.com/google/pprof

Installing pprof:

go install github.com/google/pprof@latest

Viewing a profile in graph format:

pprof -web heap.gz

Viewing on an interactive web interface:

pprof -http=":" heap.gz
0.0.8

1 year ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago