November's Paddleball Marathon
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

heapdump-promise

1.0.0 • Public • Published

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}`)
  })

install

npm i heapdump-promise

Downloadsweekly downloads

3

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability