Socket
Socket
Sign inDemoInstall

heapdump-promise

Package Overview
Dependencies
14
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    heapdump-promise

A promise to take a heap dump


Version published
Weekly downloads
21
increased by162.5%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

heapdump-promise

Dependency status Build status Coverage status

Wraps headpdump in a promise compatible API.

Installation

$ npm install --save heapdump-promise

Usage

const writeHeapSnapshot = require('heapdump-promise')

writeHeapSnapshot()
  .then((path) => {
    console.info(`A heap dump was written to ${path}`)
  })
  .catch((error) => {
    console.error(`Could not write heap dump because ${error}`)
  })

All arguments are passed to heapdump.writeSnapshot() as-is:

const writeHeapSnapshot = require('heapdump-promise')
const path = '/tmp/my-process.' + Date.now() + '.snapshot'

writeHeapSnapshot(path)
  .then((path) => {
    console.info(`A heap dump was written to ${path}`)
  })
  .catch((error) => {
    console.error(`Could not write heap dump because ${error}`)
  })

Keywords

FAQs

Last updated on 16 Aug 2016

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