Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noderaider/violin
Instrumentation with pre-built node binaries.
https://github.com/noderaider/violin
heap instrumentation violin
Last synced: 2 days ago
JSON representation
Instrumentation with pre-built node binaries.
- Host: GitHub
- URL: https://github.com/noderaider/violin
- Owner: noderaider
- License: mit
- Created: 2016-06-16T18:11:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-24T00:40:41.000Z (over 8 years ago)
- Last Synced: 2024-12-05T08:05:56.980Z (17 days ago)
- Topics: heap, instrumentation, violin
- Language: JavaScript
- Size: 22 MB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# violin
**Node instrumentation with pre-built node binaries.**
**Internally packages and runs [heapdump](https://npmjs.com/packages/heapdump) so the consumer does not need node-gyp working on their machine.**
[![Build Status](https://travis-ci.org/noderaider/violin.svg?branch=master)](https://travis-ci.org/noderaider/violin)
[![codecov](https://codecov.io/gh/noderaider/violin/branch/master/graph/badge.svg)](https://codecov.io/gh/noderaider/violin)[![NPM](https://nodei.co/npm/violin.png?stars=true&downloads=true)](https://nodei.co/npm/violin/)
## Install
`npm i -S violin`
## Usage
```js
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()
```---
## TEST
**Unit tests output for current release:**
# TOC
- [lib](#lib)
- [#default](#lib-default)
- [violin](#lib-violin)
- [#instrument](#lib-violin-instrument)
# lib
## #default
should have default function export.```js
return should.exist(lib.default);
```
## violin
should be a function.```js
return violin.should.be.a('function');
```
### #instrument
should return an instrument object.```js
return violin().should.be.an('object').that.has.property('instrument');
```should not throw for valid opts.
```js
return function () {
return violin(opts).instrument();
}.should.not.throw();
```