Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pachelbel

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pachelbel

query performance monitoring for express and node-pg

  • 0.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

pachelbel

pachelbel is a query performance monitor for the express framework using the node-pg driver for PostgreSQL. It works by proxying elements of the pg driver to store query statistics in an in-memory SQLite database and providing a statistics dashboard in the host application.

Usage

pachelbel requires the pg module as a peer dependency. Ensure that it is available if you are using a framework or driver wrapper such as MassiveJS.

In your app.js, require pachelbel and wire it to a route. pachelbel must be loaded before pg in order to proxy the driver correctly.

if (process.env.NODE_ENV !== 'production') {
  app.use('/pachelbel', require('pachelbel'));
}

Note that pachelbel is not, by default, wired into any authentication system you may have and will therefore happily give query statistics and prepared statement text to anyone and everyone unless you take your own precautions to secure it.

Customizing thresholds

By default, queries taking 100ms or more are considered "bad" (yellow), and queries taking 500ms or more "worse" (red). To customize these, change pachelbel's thresholds object before the app.use directive:

pachelbel.thresholds = { bad: 200, worse: 750 };

Keywords

FAQs

Package last updated on 22 Jan 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc