{"_id":"memwatch-next","_rev":"303940","name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"time":{"modified":"2021-06-03T19:25:14.000Z","created":"2015-03-30T11:40:41.454Z","0.3.0":"2016-04-30T10:23:31.339Z","0.2.10":"2015-11-09T18:45:05.537Z","0.2.9":"2015-08-21T09:44:48.144Z","0.2.8":"2015-08-21T08:43:13.885Z","0.2.7":"2015-07-11T14:33:37.423Z","0.2.6":"2015-05-12T17:39:51.111Z","0.2.5-1":"2015-05-12T17:35:35.428Z","0.2.5":"2015-05-07T13:40:26.157Z","0.2.4":"2015-05-07T12:09:54.234Z","0.2.3":"2015-03-30T11:40:41.454Z"},"users":{"nmccready":true,"liveinjs":true,"markthethomas":true,"sakai135":true,"ferrari":true,"nfriedly":true,"whitelynx":true,"hengkiardo":true,"sopepos":true,"justinshea":true,"schahriar":true,"timdp":true,"qlqllu":true,"majgis":true,"kheyse":true,"princetoad":true,"antixrist":true,"mwolson":true,"davidatkinsondoyle":true,"aaronup":true,"rbecheras":true,"carvantes":true,"yonigoldberg":true,"joaquin.briceno":true,"liko":true,"meetravi":true,"galkin":true,"zafaransari":true,"rocket0191":true,"kevin-foster":true,"rping":true,"scriptkitty":true,"michaeloryl":true,"rfortune":true,"losymear":true,"paulohsilvapinto":true,"4matic":true,"programmer.severson":true},"author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"versions":{"0.3.0":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.3.0","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"^2.4.5","should":"^8.3.1"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.1","nan":"^2.3.2"},"gitHead":"23b2da5b986b9f6db776e4a236437500a6ddbf68","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.3.0","_shasum":"2111050f9a906e0aa2d72a4ec0f0089c78726f8f","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.0","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"2111050f9a906e0aa2d72a4ec0f0089c78726f8f","size":10786,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.3.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/memwatch-next-0.3.0.tgz_1462011810402_0.1741884653456509"},"directories":{},"publish_time":1462011811339,"_cnpm_publish_time":1462011811339,"_hasShrinkwrap":false},"0.2.10":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.10","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^2.0.0"},"gitHead":"d586015524f56b70571152ae1c1fc6b41401e2f8","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.10","_shasum":"7047fceaf25a3a5cf9349d7ee5644cfebff36414","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"7047fceaf25a3a5cf9349d7ee5644cfebff36414","size":10777,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.10.tgz"},"directories":{},"publish_time":1447094705537,"_cnpm_publish_time":1447094705537,"_hasShrinkwrap":false},"0.2.9":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.9","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^2.0.0"},"gitHead":"3c624fdd55ff680b7edaa64c75f50256477da512","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.9","_shasum":"b44067e9233bb35e8654f62c2bfb2c262cc37995","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.5.0","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"b44067e9233bb35e8654f62c2bfb2c262cc37995","size":10782,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.9.tgz"},"directories":{},"publish_time":1440150288144,"_cnpm_publish_time":1440150288144,"_hasShrinkwrap":false},"0.2.8":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.8","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^2.0.0"},"gitHead":"1dbb83de08e53cbea8c1909918539144fa28e6f0","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.8","_shasum":"a6dc00bb8e3331bc3641140e4228d26d615d34b9","_from":".","_npmVersion":"2.13.3","_nodeVersion":"3.1.0","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"a6dc00bb8e3331bc3641140e4228d26d615d34b9","size":10710,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.8.tgz"},"directories":{},"publish_time":1440146593885,"_cnpm_publish_time":1440146593885,"_hasShrinkwrap":false},"0.2.7":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.7","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.8.0"},"gitHead":"f88aa00ba19f9acb81c4647d22255cdbceb98f7f","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.7","_shasum":"a356724e4896120fcdc82f3e92c274ec35bc5c80","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"a356724e4896120fcdc82f3e92c274ec35bc5c80","size":10572,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.7.tgz"},"directories":{},"publish_time":1436625217423,"_cnpm_publish_time":1436625217423,"_hasShrinkwrap":false},"0.2.6":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.6","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.8.0"},"gitHead":"661f35b84c1e0d0a2b7e41c01f21d98dac2ba79e","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.6","_shasum":"7924080d6ce6fc952406c186906222d3390cd0c4","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"7924080d6ce6fc952406c186906222d3390cd0c4","size":10543,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.6.tgz"},"directories":{},"publish_time":1431452391111,"_cnpm_publish_time":1431452391111,"_hasShrinkwrap":false},"0.2.5-1":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.5-1","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.8.0"},"gitHead":"d1b66c4459037c86e97252e54dd0b52ee5d7737e","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.5-1","_shasum":"601e47e317feb49f8c6f30117c5ca244b31a7e3e","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"601e47e317feb49f8c6f30117c5ca244b31a7e3e","size":10551,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.5-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.5-1.tgz"},"directories":{},"publish_time":1431452135428,"_cnpm_publish_time":1431452135428,"_hasShrinkwrap":false},"0.2.5":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.5","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.8.0"},"gitHead":"99614a3ad49590fc3b85c89ab6df57db83fd3e72","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.5","_shasum":"737d15bf1abfb79c8e8cf5444d8178b4203ed04e","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"737d15bf1abfb79c8e8cf5444d8178b4203ed04e","size":10528,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.5.tgz"},"directories":{},"publish_time":1431006026157,"_cnpm_publish_time":1431006026157,"_hasShrinkwrap":false},"0.2.4":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.4","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"git+https://github.com/marcominetti/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.8.0"},"gitHead":"b7db604e6a58b371037c1fdbcd848aba90be2494","gypfile":true,"homepage":"https://github.com/marcominetti/node-memwatch#readme","_id":"memwatch-next@0.2.4","_shasum":"aa4a422148059ed3f8a27df0e2803d6f0afc262e","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"aa4a422148059ed3f8a27df0e2803d6f0afc262e","size":10537,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.4.tgz"},"directories":{},"publish_time":1431000594234,"_cnpm_publish_time":1431000594234,"_hasShrinkwrap":false},"0.2.3":{"name":"memwatch-next","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.3","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.8.0"},"repository":{"type":"git","url":"https://github.com/lloyd/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/lloyd/node-memwatch/issues"},"scripts":{"install":"node-gyp rebuild","test":"mocha tests --reporter spec"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"dependencies":{"bindings":"^1.2.0","nan":"^1.6.0"},"gitHead":"c736f948086cdb5c7a0f997552fe99c3f9ed7be5","gypfile":true,"homepage":"https://github.com/lloyd/node-memwatch","_id":"memwatch-next@0.2.3","_shasum":"798338248695eb1347cf8efc554803526d468866","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"marcominetti","email":"marco.minetti@novetica.org"},"maintainers":[{"name":"marcominetti","email":"marco.minetti@novetica.org"}],"dist":{"shasum":"798338248695eb1347cf8efc554803526d468866","size":10530,"noattachment":false,"key":"/memwatch-next/-/memwatch-next-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/memwatch-next/download/memwatch-next-0.2.3.tgz"},"directories":{},"publish_time":1427715641454,"_cnpm_publish_time":1427715641454,"_hasShrinkwrap":false}},"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://travis-ci.org/deepak1556/node-memwatch.svg?branch=master)](https://travis-ci.org/deepak1556/node-memwatch)\n\n`node-memwatch` is here to help you detect and find memory leaks in\nNode.JS code.  It provides:\n\n- A `leak` event, emitted when it appears your code is leaking memory.\n\n- A `stats` event, emitted occasionally, giving you\n  data describing your heap usage and trends over time.\n\n- A `HeapDiff` class that lets you compare the state of your heap between\n  two points in time, telling you what has been allocated, and what\n  has been released.\n\n\nInstallation\n------------\n\n- `npm install memwatch-next`\n\nor\n\n- `git clone git://github.com/marcominetti/node-memwatch.git`\n\n\nDescription\n-----------\n\nThere are a growing number of tools for debugging and profiling memory\nusage in Node.JS applications, but there is still a need for a\nplatform-independent native module that requires no special\ninstrumentation.  This module attempts to satisfy that need.\n\nTo get started, import `node-memwatch` like so:\n\n```javascript\nvar memwatch = require('memwatch-next');\n```\n\n### Leak Detection\n\nYou can then subscribe to `leak` events.  A `leak` event will be\nemitted when your heap usage has increased for five consecutive\ngarbage collections:\n\n```javascript\nmemwatch.on('leak', function(info) { ... });\n```\n\nThe `info` object will look something like:\n\n```javascript\n{ start: Fri, 29 Jun 2012 14:12:13 GMT,\n  end: Fri, 29 Jun 2012 14:12:33 GMT,\n  growth: 67984,\n  reason: 'heap growth over 5 consecutive GCs (20s) - 11.67 mb/hr' }\n```\n\n\n### Heap Usage\n\nThe best way to evaluate your memory footprint is to look at heap\nusage right aver V8 performs garbage collection.  `memwatch` does\nexactly this - it checks heap usage only after GC to give you a stable\nbaseline of your actual memory usage.\n\nWhen V8 performs a garbage collection (technically, we're talking\nabout a full GC with heap compaction), `memwatch` will emit a `stats`\nevent.\n\n```javascript\nmemwatch.on('stats', function(stats) { ... });\n```\n\nThe `stats` data will look something like this:\n\n```javascript\n{\n  \"num_full_gc\": 17,\n  \"num_inc_gc\": 8,\n  \"heap_compactions\": 8,\n  \"estimated_base\": 2592568,\n  \"current_base\": 2592568,\n  \"min\": 2499912,\n  \"max\": 2592568,\n  \"usage_trend\": 0\n}\n```\n\n`estimated_base` and `usage_trend` are tracked over time.  If usage\ntrend is consistently positive, it indicates that your base heap size\nis continuously growing and you might have a leak.\n\nV8 has its own idea of when it's best to perform a GC, and under a\nheavy load, it may defer this action for some time.  To aid in\nspeedier debugging, `memwatch` provides a `gc()` method to force V8 to\ndo a full GC and heap compaction.\n\n\n### Heap Diffing\n\nSo far we have seen how `memwatch` can aid in leak detection.  For\nleak isolation, it provides a `HeapDiff` class that takes two snapshots\nand computes a diff between them.  For example:\n\n```javascript\n// Take first snapshot\nvar hd = new memwatch.HeapDiff();\n\n// do some things ...\n\n// Take the second snapshot and compute the diff\nvar diff = hd.end();\n```\n\nThe contents of `diff` will look something like:\n\n```javascript\n{\n  \"before\": { \"nodes\": 11625, \"size_bytes\": 1869904, \"size\": \"1.78 mb\" },\n  \"after\":  { \"nodes\": 21435, \"size_bytes\": 2119136, \"size\": \"2.02 mb\" },\n  \"change\": { \"size_bytes\": 249232, \"size\": \"243.39 kb\", \"freed_nodes\": 197,\n    \"allocated_nodes\": 10007,\n    \"details\": [\n      { \"what\": \"String\",\n        \"size_bytes\": -2120,  \"size\": \"-2.07 kb\",  \"+\": 3,    \"-\": 62\n      },\n      { \"what\": \"Array\",\n        \"size_bytes\": 66687,  \"size\": \"65.13 kb\",  \"+\": 4,    \"-\": 78\n      },\n      { \"what\": \"LeakingClass\",\n        \"size_bytes\": 239952, \"size\": \"234.33 kb\", \"+\": 9998, \"-\": 0\n      }\n    ]\n  }\n}\n```\n\nThe diff shows that during the sample period, the total number of\nallocated `String` and `Array` classes decreased, but `Leaking Class`\ngrew by 9998 allocations.  Hmmm.\n\nYou can use `HeapDiff` in your `on('stats')` callback; even though it\ntakes a memory snapshot, which triggers a V8 GC, it will not trigger\nthe `stats` event itself.  Because that would be silly.\n\n\nFuture Work\n-----------\n\nPlease see the Issues to share suggestions and contribute!\n\n\nLicense\n-------\n\nhttp://wtfpl.org\n","_attachments":{},"homepage":"https://github.com/marcominetti/node-memwatch#readme","bugs":{"url":"https://github.com/marcominetti/node-memwatch/issues"}}