1.1.1 • Published 6 years ago

heapsnapshot.js v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

npm GitHub

heapdump.js

A tool to take a heap snapshot via V8 profiler, which is inspired by Understanding Garbage Collection and hunting Memory Leaks in Node.js

required

  • Node.js >= 6.4.0
  • OSX: This code is only pass-test on OSX platform

install

npm install heapsnapshot.js

usage

add this code to the start

require('heapsnapshot.js').init()

heapsnapshot.init(dataDir)

  • dataDir the path of folder for heap snapshot file. Default:.
  • options
    • interval the interval millisecond to check the usage of memory. Default:500
    • step: the distance between two adjacent threshold. Default:50
    • threshold: the initial threshold. Default:0