memory-tripwire

1.0.0 • Public • Published

memory-tripwire

NPM version build status Test coverage David deps node version Gittip

suicide when memory over the limit

Installation

$ npm install memory-tripwire

Usage

var tripwire = Tripwire({
  warning: '20mb',
  critical: '40mb',
  interval: '1s',
  cycle: 3,
  exitTime: '5s',
  disconnectTime: '3s'
});
 
tripwire.start();
tripwire.on('bomb', function () {
  console.log('oops');
});

Options

  • warning - warning memory limit, will be killed after observation
  • critical - critical memory limit, will be killed at once if memory is critical
  • interval - memory check interval
  • cycle - max warning continuously cycle, or will be killed
  • disconnectTime - will disconnect after disconnctTime
  • exitTime - will exit after exitTime
  • exitCode - will exit with exitCode

Examples

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i memory-tripwire

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dead_horse