{"bugs":{"url":"https://github.com/dainis/node-gcstats/issues"},"dist":{"shasum":"72b21c28e76cd88000de7e8abf9cea388d161b26","tarball":"https://registry.npmjs.org/gc-stats/-/gc-stats-1.4.1-0.tgz","fileCount":9,"integrity":"sha512-nlVhRG7pe2Chx5wdfShx1vpq9Fo6dunUE2RowKWT42FINPx2+l7UB3b8VUWCXaTzUEYaZlbwbpEJ2pnS3VLTww==","signatures":[{"sig":"MEUCIQDjCU3kH2saui+zbfIAlE0b9GyF2vBYjZGrlFj1LzctNAIgH/7qUb8fRAqcGDwcDd/AcM1j3X9yhked5+sfGRXUH7Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16535},"main":"index.js","name":"gc-stats","readme":"# GCStats\n[![Build Status](https://travis-ci.org/dainis/node-gcstats.svg?branch=master)](https://travis-ci.org/dainis/node-gcstats) [![Build status](https://ci.appveyor.com/api/projects/status/oeu171tgxbsac88q/branch/master?svg=true)](https://ci.appveyor.com/project/dainis/node-gcstats/branch/master)\n\nExposes stats about V8 GC after it has been executed.\n\n# Usage\n\nCreate a new instance of the module and subscribe to `stats`-events from that:\n\n    var gc = (require('gc-stats'))();\n\n    gc.on('stats', function (stats) {\n        console.log('GC happened', stats);\n    });\n\nThis will print blobs like this whenever a GC happened:\n\n    GC happened {\n      startTime: 9426055813976,\n      endTime: 9426057735390,\n      pause: 1921414,\n      pauseMS: 1,\n      gctype: 1,\n      before: {\n         totalHeapSize: 11354112,\n         totalHeapExecutableSize: 3670016,\n         usedHeapSize: 7457184,\n         heapSizeLimit: 1501560832,\n         totalPhysicalSize: 9725880,\n         totalAvailableSize: 1488434544,\n         mallocedMemory: 8192,\n         peakMallocedMemory: 1186040\n      },\n      after: {\n         totalHeapSize: 12402688,\n         totalHeapExecutableSize: 3670016,\n         usedHeapSize: 6485792,\n         heapSizeLimit: 1501560832,\n         totalPhysicalSize: 10166144,\n         totalAvailableSize: 1489388528,\n         mallocedMemory: 8192,\n         peakMallocedMemory: 1186040\n      },\n      diff: {\n         totalHeapSize: 1048576,\n         totalHeapExecutableSize: 0,\n         usedHeapSize: -971392,\n         heapSizeLimit: 0,\n         totalPhysicalSize: 440264,\n         totalAvailableSize: 953984,\n         mallocedMemory: 0,\n         peakMallocedMemory: 0\n      }\n    }\n\n## Property insights\n* totalHeapSize: Number of bytes V8 has allocated for the heap. This can grow if usedHeap needs more.\n* usedHeapSize: Number of bytes in use by application data\n* total HeapExecutableSize: Number of bytes for compiled bytecode and JITed code\n* heapSizeLimit: The absolute limit the heap cannot exceed\n* totalPhysicalSize: Committed size (node 0.11+)\n* totalAvailableSize: Available heap size(node 4+)\n* startTime: Nanoseconds for start, using hrtime()\n* endTime: Nanoseconds for end, using hrtime()\n* pause: Nanoseconds from start to end of GC using hrtime()\n* pauseMS: pause expressed in milliseconds\n* mallocedMemory\n* peakMallocedMemory\n* numberOfNativeContexts\n* numberOfDetachedContexts\n* gctype can have the following values([v8 source](https://github.com/nodejs/node/blob/554fa24916c5c6d052b51c5cee9556b76489b3f7/deps/v8/include/v8.h#L6137-L6144)):\n  * 1: Scavenge (minor GC)\n  * 2: Mark/Sweep/Compact (major GC)\n  * 4: Incremental marking\n  * 8: Weak/Phantom callback processing\n  * 15: All\n\n# Installation\n\n    npm install gc-stats\n\n# Node version support\nnode-gcstats depends on C++ extensions which are compiled when the *gc-stats* module is installed. Compatibility information can be inspected via the [Travis-CI build jobs](https://travis-ci.org/dainis/node-gcstats/).\n","engines":{"node":">=16"},"gitHead":"78337018c0690d9cb7291093bd7d31be47b09728","gypfile":true,"license":"Unlicense","scripts":{"test":"mocha -n expose-gc tests/*","build":"node-gyp-build","clean":"rimraf ./build","example":"node --expose-gc example.js","install":"node-gyp-build","pretest":"npm run build","prepublish":"npm ls"},"_npmUser":{"name":"dainis","email":"dainis@tillers.lv"},"homepage":"https://github.com/dainis/node-gcstats#readme","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+ssh://git@github.com/dainis/node-gcstats.git","type":"git"},"_npmVersion":"9.6.7","description":"Exposes node v8 garbage collection stats","directories":{},"maintainers":[{"name":"dainis","email":"dainis@tillers.lv"}],"_nodeVersion":"18.17.0","dependencies":{"nan":"^2.18.0","node-gyp-build":"^4.8.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"^10.3.0","rimraf":"^5.0.5","semver":"^5.7.0","should":"^13.2.3"},"_npmOperationalInternal":{"tmp":"tmp/gc-stats_1.4.1-0_1708249708557_0.9702964735427733","host":"s3://npm-registry-packages"},"_id":"gc-stats@1.4.1-0","version":"1.4.1-0"}