A deadly simple wrapper of node-memwatch to dump you heap when leaking occurs.
- add the following snippet to your process,
by default the heap dump will be saved in the path like
/tmp/profile-{pid}-{timestamp}.heapsnapshot.
const watcher = require('memwatcher')
watcher();
- set environment variable
MONITOR_MEMtoyes
MIT