1.0.0 • Published 9 years ago
signal-profiler v1.0.0
Signal Profiler
Attach a listener to a SIGPIPE signal, that will trigger v8-profiler snapshot.
Installation
npm install --save signal-profilerUsage
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.heapsnapshotOptions
signalProfiler({
// folder to save the snapshot
snapshotPath: `.`
})process.env.SNAPSHOT_PATH: same assnapshotPath
1.0.0
9 years ago