{"_id":"memwatch","_rev":"111-5a6c767c6268ffc63583ede9415e0a6d","name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.0","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.0"},"repository":{"type":"git","url":"git://github.com/lloyd/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/lloyd/node-memwatch/issues"},"scripts":{"install":"make build"},"contributors":[{"name":"Jed Parsons","url":"@jedp"}],"_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"_id":"memwatch@0.1.0","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"a2cea778453f5c26234e4d9d8341209f4af6e7f3","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.0.tgz","integrity":"sha512-TaUooqEKNxJ7/4l5ni80Y6F6KxjM/XiUKlP+fGawSGoTKtk/FK9NNCH1x8x8eq2SPFZYbNLi0mRt+usfOMhsdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDQOsNC3k963XfzwtljMG4S8jH1peTeFlWtjh8BsDHidAiEA8Ea5qUmQfW87HMSSsje75nGNwaLalcKPlGtXDKKjzzY="}]},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.1.1":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.1","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.0"},"repository":{"type":"git","url":"git://github.com/lloyd/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/lloyd/node-memwatch/issues"},"scripts":{"install":"make build"},"contributors":[{"name":"Jed Parsons","url":"@jedp"}],"_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"_id":"memwatch@0.1.1","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"9c864ba7259789461536dc7706c888546acf2cd8","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.1.tgz","integrity":"sha512-DDDseqfr3u7ignIUn9Up/UxZTVMhoVq7vi+alQzBe5dhBvXJDYjC244Ov93uzffjF5i6N8m2eCDzWOxUZuoQlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2khE7Rq9q4k9yHRxAnVMImIbM9zEkR2Rj4yAPTQu8pAIgPxix5Sbz8KvNVLJkFoh8R/64c9SXldHx2x64RN7X5uM="}]},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.1.2":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.2","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.0"},"repository":{"type":"git","url":"git://github.com/lloyd/node-memwatch.git"},"main":"include.js","licenses":[{"type":"wtfpl"}],"bugs":{"url":"https://github.com/lloyd/node-memwatch/issues"},"scripts":{"install":"make build","test":"mocha tests"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"}],"_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"_id":"memwatch@0.1.2","dependencies":{},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"9fa81d0e15ee0284acdfc571261e01ae4f3df43f","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.2.tgz","integrity":"sha512-xT3RapmdiCOJPszFF1bTIffDZXshl5OW+mitvRb7mq5MFlkZsPuPcDtMpOuho8VZ+Nm9baAhuCz7BzNoiWRvZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHH7sH3AscoWqh981AOXv6lbEimg5Mfvb/t7NsOQR2UPAiBbMgHWDS6ZVt4a2PwiRSAgQZahe9QHCW1eyC/vszq0wQ=="}]},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.1.3":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.3","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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":"make build","test":"mocha tests"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3"},"contributors":[{"name":"Jed Parsons","url":"@jedp"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","_id":"memwatch@0.1.3","dist":{"shasum":"c5c99e8aa7b3d79d731f9d1201b580afd65c32f7","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.3.tgz","integrity":"sha512-t3ZqzaM7guX1X2NUG7TlroO/CzBjYb1HRMWkZfiMEkHILg+AMhBWlLJsvm2e3iQ+Su64dl5oNeylFFw9uCM65Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbVk12c0ErSBqCDWdYE6jT5CY1yliEnAgM2Hi/2fMh2AiEA9Ik5wIw+yH9Akci7jyUEqcxrJ07iqvUYIazyqU2KfDk="}]},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.1.4":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.4","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3","node-gyp":"0.5.7"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","_id":"memwatch@0.1.4","dist":{"shasum":"bb65076a41be5e723bd1cbfbb258bcb090013c6b","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.4.tgz","integrity":"sha512-einjgr/wMHPe4f1tfQeKxu1lW7HDqb3BlNHdy9JiZ67h7q6b+b/6BoF6gXS5h/5ia4b0trC4bcSf3//shbgALg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGc9tbexa18k95jBtKzB5vCZnGtpfFNiQZ6nSWW+05GmAiBsP0BIwWE4NB82eYfHvmakK+0/KZp7Nw7amdrlhXIn0Q=="}]},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.1.5":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.1.5","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3","node-gyp":"0.5.7"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","readmeFilename":"README.md","_id":"memwatch@0.1.5","dist":{"shasum":"b8158f87e4220a8985efdc5965e0b85a8213cd71","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.1.5.tgz","integrity":"sha512-GK2KpMrqmJ0z8TttkXcJC2B2ptXGGbmHLY/JPnqEBrV+s5CaXOYF8RxBqfh923aVU/RfM4sRNxkUTS6rZSWNpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlEq6drsCoMa9zJe2GMXJGMt1WAQA95ZuuzOJFCTX2nAiA2XDCMrwS1vRr5XqMr0n5fl/xoJqwZ5R1q4XLKageBgQ=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.2.0":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.0","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3","node-gyp":"0.5.7"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","readmeFilename":"README.md","_id":"memwatch@0.2.0","dist":{"shasum":"3e3dcd9e4b21473d4ab44e6ef70a899e87205872","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.2.0.tgz","integrity":"sha512-wwMQ8xAoLS8d9CzjzTugcVIDt8qu4eYDyA+P6JurEXvuzMo+CWT8ZAhBBMngpaZa+F2kZzo1l5oFnamznnzolw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCo44L6cilvFL0n/H0SYZzytZGkQI7N3MMG2V0XfTKH5QIgJj+lX4kV+zhUWvh7xGdLA25uhro7fCpBcIugMEIKSX4="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.2.1":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.1","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3","node-gyp":"0.5.7"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","readmeFilename":"README.md","_id":"memwatch@0.2.1","dist":{"shasum":"a43a4098ea780b3056b8542e236f8b8de2e69085","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.2.1.tgz","integrity":"sha512-xZa/soAAYKveJytkedXK2qUjQQkfSUIZcA+/IdfZsNViV0Vqso4fyhOpSDbq0ltqX6K04pS+gycrU28m1BE12Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAS8VNkYLH0oYV0XMrjWHdX6oy20AfDdzMp5qqg2BQTKAiEA9xLIIJCTHNaIWa+AFe1aMXq09rEY/RtpI8nNSlxt3mM="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}},"0.2.2":{"name":"memwatch","description":"Keep an eye on your memory usage, and discover and isolate leaks.","version":"0.2.2","author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"engines":{"node":">= 0.6.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"},"devDependencies":{"mocha":"1.2.2","should":"0.6.3","node-gyp":"0.5.7"},"contributors":[{"name":"Jed Parsons","url":"@jedp"},{"name":"Jeff Haynie","url":"@jhaynie"},{"name":"Justin Matthews","url":"@jmatthewsr-ms"}],"readme":"`node-memwatch`: Leak Detection and Heap Diffing for Node.JS\n============================================================\n\n[![Build Status](https://secure.travis-ci.org/lloyd/node-memwatch.png)](http://travis-ci.org/lloyd/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`\n\nor\n\n- `git clone git://github.com/lloyd/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');\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\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","readmeFilename":"README.md","_id":"memwatch@0.2.2","dist":{"shasum":"779e8cd982532b6221b6ed1c1269098bee16f92c","tarball":"https://registry.npmjs.org/memwatch/-/memwatch-0.2.2.tgz","integrity":"sha512-5G/ZdSQLB7XXaaQYDY9miCXygHGuDGZZ0PSWE/ttV1LT55PCst9urfjyGq7j4W98EUh28eEOX4JauLRE1mnquQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2pRx4/4zn32+2Cls3tNKq80YG9r16SWvRTL87SIu4JgIgUPX9NKkC9QZmgcq5exK06q3AUv7n0vcu+t4xb4DpYKQ="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"lloyd","email":"lloyd@hilaiel.com"},"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"directories":{}}},"readme":null,"maintainers":[{"name":"lloyd","email":"lloyd@hilaiel.com"}],"time":{"modified":"2022-06-19T17:47:35.917Z","created":"2012-06-30T23:32:24.424Z","0.1.0":"2012-06-30T23:32:25.779Z","0.1.1":"2012-06-30T23:32:45.371Z","0.1.2":"2012-07-05T14:31:52.629Z","0.1.3":"2012-07-05T15:45:14.674Z","0.1.4":"2012-07-07T12:52:14.582Z","0.1.5":"2012-11-08T03:10:35.798Z","0.2.0":"2012-11-10T22:36:23.172Z","0.2.1":"2013-03-13T21:42:00.509Z","0.2.2":"2013-03-13T23:01:59.219Z"},"author":{"name":"Lloyd Hilaiel","url":"http://lloyd.io"},"repository":{"type":"git","url":"https://github.com/lloyd/node-memwatch.git"},"users":{"dubban":true,"meggesje":true,"pid":true,"stdarg":true,"morettoni":true,"maxzhang":true,"niccai":true,"tehdb":true,"fanchangyong":true,"flockonus":true,"stringparser":true,"jupiter":true,"xchangebit":true,"markthethomas":true,"jonatasnona":true,"ruzz311":true,"barenko":true,"khanghoang":true,"thewolff":true,"dentuzhik":true,"wangnan0610":true,"phajej":true,"crewmoss":true,"qqqppp9998":true,"justinshea":true,"liveinjs":true,"fedor":true,"anudeep.webdev":true,"honzajde":true,"santihbc":true,"ferrari":true,"valeriu-zdrobau":true,"chinaqstar":true,"fatelei":true,"stany":true,"sopepos":true,"qlqllu":true,"bojand":true,"feedhenry":true,"celticparser":true,"nepoxx":true,"diegoperini":true,"huina.gu":true,"toby_reynold":true,"retorillo":true,"yonigoldberg":true,"szymex73":true,"holly":true,"gfilip":true,"eugeneduvenage":true,"wangfeia":true,"iuykza":true,"suddi":true,"ahmed-dinar":true,"kevin-foster":true,"stoneren":true,"parkerproject":true,"bsrinivas":true}}