Socket
Socket
Sign inDemoInstall

express-pprof-middleware

Package Overview
Dependencies
87
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-pprof-middleware

Express middleware that exposes pprof endpoints for easy profiling


Version published
Weekly downloads
4
decreased by-63.64%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 02 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc