signal-profiler
v1.0.0
Published
Make v8-profiler heap snapshot triggered by a process signal SIGPIPE
Downloads
3
Readme
Signal Profiler
Attach a listener to a SIGPIPE signal, that will trigger v8-profiler snapshot.
Installation
npm install --save signal-profiler
Usage
import signalProfiler from 'signal-profiler'
// attach profiler
signalProfiler()
OR
var signalProfiler = require('signal-profiler')
// attach profiler
signalProfiler()
The console will show this:
#profiler - active: "kill -s SIGPIPE ${PID}"
Run the command (kill -s SIGPIPE ${PID}
) to save a snapshot.
#profiler - signal SIGPIPE received
#profiler - snapshot saved at 2016_10_03_03_44_10.heapsnapshot
Options
signalProfiler({
// folder to save the snapshot
snapshotPath: `.`
})
process.env.SNAPSHOT_PATH
: same assnapshotPath