npm.io
1.1.1 • Published 7 years ago

heapsnapshot.js

Licence
MIT
Version
1.1.1
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
1

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][,options])

  • 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

Keywords