Node instrumentation with pre-built node binaries.
Internally packages and runs heapdump so the consumer does not need node-gyp working on their machine.
npm i -S violin
import violin from 'violin' /** Create a memory dump on startup */ const opts = { instrument: { memory: { startup: true /** Create a memory dump every 4 hours */ , frequency: 14400000 /** Create a memory dump whenever any of these process.on events occur */ , events: [ 'uncaughtException' ] } } } const { instrument } = violin(opts) /** Start instrumenting memory per above options */ instrument()Unit tests output for current release:
should have default function export.
return should.exist(lib.default);should be a function.
return violin.should.be.a('function');should return an instrument object.
return violin().should.be.an('object').that.has.property('instrument');should not throw for valid opts.
return function () { return violin(opts).instrument(); }.should.not.throw();