{"_id":"@alesmenzel/heapdump","_rev":"1-9707c2338495351d420a24636faf9bd9","name":"@alesmenzel/heapdump","dist-tags":{"latest":"0.3.10"},"versions":{"0.3.10":{"name":"@alesmenzel/heapdump","version":"0.3.10","description":"Make a dump of the V8 heap for later inspection.","homepage":"https://github.com/bnoordhuis/node-heapdump","author":{"name":"Ben Noordhuis","email":"info@bnoordhuis.nl","url":"http://bnoordhuis.nl/"},"repository":{"type":"git","url":"git://github.com/bnoordhuis/node-heapdump.git"},"engines":{"node":">=0.10.0"},"license":"ISC","scripts":{"test":"tap test/test-*","install":"node-gyp rebuild"},"dependencies":{"nan":"^2.11.1"},"devDependencies":{"shelljs":"~0.3.0","tap":"~0.4.12"},"gypfile":true,"gitHead":"2c74aeaed659d0aac42e77ff00e44fd23e983a16","bugs":{"url":"https://github.com/bnoordhuis/node-heapdump/issues"},"_id":"@alesmenzel/heapdump@0.3.10","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"alesmenzel","email":"alesmenzel@gmail.com"},"dist":{"integrity":"sha512-zdk8upYHWAZJ959OU9gV3hM7AoowzCD8NC1Utk4nFzkrMu3r7cx6ANEfXviNlg26v2tya57SzsenQ07uNGLQjw==","shasum":"c2d446ba372f80f9aef71aff492e6a2dde542a9f","tarball":"https://registry.npmjs.org/@alesmenzel/heapdump/-/heapdump-0.3.10.tgz","fileCount":12,"unpackedSize":25019,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb20NhCRA9TVsSAnZWagAA0lsP/2xusMDCttIC4YDssGu0\n6rNfPyHNCIK4jH7Zr/5a+Ie2ggZFtZvjTuDC6bebZwS5szhjt+lKlNnEF4tk\nLM1u7T4sGkzZzOEaTKKo1hczRmQTx4JJwJbz7AFRAc0mxdZRuWQNMTKB+ymW\nEqQstT6jvCLhqcJaQJPiHQ2c/LodyAD4dkXUF9FJ5iMDULKEBB1aamovFdc7\n/rQVOv9YvHCwfPG9yufC2z8i8ygFSYEyeexSYi6XsfG2XxJZCY7nJH5q6YNZ\nrmPHj6lpkUgAm/COpetz57mzUFo1DSLWJGMb6FVanVP/t1YmIEdEAhmkadt4\n5L2UA8bkanYszUIcC1IQI352gEzmSIrMpRF/1eM0LvtrC4+u9zFyNWcDbFRV\nqPp6kkN2No7h9xJZcoU5Lt1x5JtSzxiQEeRu7i4tIyKXlN5BjceApgG7FSUg\n4ZpWAqxFR28tUHHMhYCsByyIkyElZ1+5EAPOSPw8qTmv88+HtBgYI/QK1r58\nhgf+lmaxvbWlJdzBso/VyR01ooPCRocIQjrnupeBcgeFeNp9Wu7fOIJgNvL2\nlS4fPlQD6wQnWNTR7sVmeh4Q0qWh8opiDKPInHpr9SD5cmePZGDiER31Pec7\nO9NUsUD5k80x8u7w6v8xTBAtPmnW2uBCT6gbue09FxFEEaR02EctCIk9EiIv\nN2EG\r\n=UvPW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYhwE0cIzuLjyhXCTFHAbjcmlYJGOoQlqWM+NGgIORjAiEAppL0NRRFr1RnNHSv9LrFBLIhT1T3bA8+cRZPAmmxN9Y="}]},"maintainers":[{"name":"alesmenzel","email":"alesmenzel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heapdump_0.3.10_1541096288632_0.9590291570806879"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-01T18:18:08.461Z","0.3.10":"2018-11-01T18:18:08.767Z","modified":"2022-04-04T12:37:51.343Z"},"maintainers":[{"name":"alesmenzel","email":"alesmenzel@gmail.com"}],"description":"Make a dump of the V8 heap for later inspection.","homepage":"https://github.com/bnoordhuis/node-heapdump","repository":{"type":"git","url":"git://github.com/bnoordhuis/node-heapdump.git"},"author":{"name":"Ben Noordhuis","email":"info@bnoordhuis.nl","url":"http://bnoordhuis.nl/"},"bugs":{"url":"https://github.com/bnoordhuis/node-heapdump/issues"},"license":"ISC","readme":"node-heapdump\r\n===\r\n\r\nMake a dump of the V8 heap for later inspection.\r\n\r\n### Install\r\n\r\n    npm install heapdump\r\n\r\nOr, if you are running node.js v0.6 or v0.8:\r\n\r\n    npm install heapdump@0.1.0\r\n\r\n### Build\r\n\r\n    node-gyp configure build\r\n\r\n### Usage\r\n\r\nLoad the add-on in your application:\r\n\r\n    var heapdump = require('heapdump');\r\n\r\nThe module exports a single `writeSnapshot([filename], [callback])` function\r\nthat writes out a snapshot.  `filename` defaults to\r\n`heapdump-<sec>.<usec>.heapsnapshot` when omitted.\r\n\r\n    heapdump.writeSnapshot('/var/local/' + Date.now() + '.heapsnapshot');\r\n\r\nThe function also takes an optional callback function which is called upon\r\ncompletion of the heap dump.\r\n\r\n    heapdump.writeSnapshot(function(err, filename) {\r\n      console.log('dump written to', filename);\r\n    });\r\n\r\nThe snapshot is written synchronously to disk.  When the JS heap is large,\r\nit may introduce a noticeable \"hitch\".\r\n\r\nPreviously, node-heapdump first forked the process before writing the snapshot,\r\nmaking it effectively asynchronous.  However, it broke the comparison view in\r\nChrome DevTools and is fundamentally incompatible with node.js v0.12.  If you\r\nreally want the old behavior and know what you are doing, you can enable it\r\nagain by setting `NODE_HEAPDUMP_OPTIONS=fork` in the environment:\r\n\r\n    $ env NODE_HEAPDUMP_OPTIONS=fork node script.js\r\n\r\nOn UNIX platforms, you can force a snapshot by sending the node.js process\r\na SIGUSR2 signal:\r\n\r\n    $ kill -USR2 <pid>\r\n\r\nThe SIGUSR2 signal handler is enabled by default but you can disable it\r\nby setting `NODE_HEAPDUMP_OPTIONS=nosignal` in the environment:\r\n\r\n    $ env NODE_HEAPDUMP_OPTIONS=nosignal node script.js\r\n\r\n### Inspecting the snapshot\r\n\r\nOpen [Google Chrome](https://www.google.com/intl/en/chrome/browser/) and\r\npress F12 to open the developer toolbar.\r\n\r\nGo to the `Memory` tab, right-click in the tab pane and select\r\n`Load profile...`.\r\n\r\nSelect the dump file and click `Open`.  You can now inspect the heap snapshot\r\nat your leisure.\r\n\r\nNote that Chrome will refuse to load the file unless it has the `.heapsnapshot`\r\nextension.\r\n\r\n### Caveats\r\n\r\nOn UNIX systems, the rule of thumb for creating a heap snapshot is that it\r\nrequires memory twice the size of the heap at the time of the snapshot.\r\nIf you end up with empty or truncated snapshot files, check the output of\r\n`dmesg`; you may have had a run-in with the system's OOM killer or a resource\r\nlimit enforcing policy, like `ulimit -u` (max user processes) or `ulimit -v`\r\n(max virtual memory size).\r\n","readmeFilename":"README.md"}