Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcollina/memwatch-sigusr2
Do a heap diff on SIGUSR2 in node
https://github.com/mcollina/memwatch-sigusr2
Last synced: 2 months ago
JSON representation
Do a heap diff on SIGUSR2 in node
- Host: GitHub
- URL: https://github.com/mcollina/memwatch-sigusr2
- Owner: mcollina
- License: mit
- Created: 2014-12-12T11:33:00.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-23T15:40:35.000Z (over 7 years ago)
- Last Synced: 2024-10-06T01:48:43.635Z (3 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 6
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
memwatch-sigusr2
================Do a heap diff on SIGUSR2 in node.
Wraps completely [memwatch-next](http://npm.im/memwatch-next) and offers the same
API.Install
-------```sh
npm install memwatch-sigusr2 --save
```Usage
-----In your leaking app:
```js
var memwatch = require('memwatch-sigusr2')
memwatch.setup()// to get the process PID, omit in production and use ps aux | grep node
console.log(process.pid)
```Then to start calculating the diff, run:
```sh
kill -sigusr2
```To stop calculating the diff, run:
```sh
kill -sigusr2
```Then, you can read your diff with:
```sh
jsonlint /tmp/heap-diff-.json
```Check [jsonlint](http://npm.im/jsonlint) for installation and usage
instructions.Acknowledgements
----------------This project was kindly sponsored by [nearForm](http://nearform.com).
License
-------MIT