You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-4
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# node-oom-heapdump
2
2
Node module which will create a V8 heap snapshot right before an "Out of Memory" error occurs.
3
-
It can also create heapdumps on request like 'v8-profiler', but does this off-process so it doesn't interfere with execution of the main process.
3
+
It can also create heapdumps and CPU profiles on request like 'v8-profiler', but does this off-process so it doesn't interfere with execution of the main process.
4
4
5
5
Tested on Node.js 8.x, but should also work fine using Node.js 6.3 upwards (According to: https://chromedevtools.github.io/devtools-protocol/v8/).
6
6
@@ -54,8 +54,8 @@ These might impact performance though.
54
54
* port - optionally, the alternative DevTools protocol port. Defaults to 9229. Should map on the port given to the --inspect arg.
55
55
56
56
# API
57
-
Besides creating heapdumps when an out of memory error occurs, there also is an API for creating heapdumps on request.
58
-
See below for the currently available API.
57
+
Besides creating heapdumps when an out of memory error occurs, there also is an API for creating heapdumps and CPU profiles on request. See below for the currently available API.
58
+
Notice that you cannot create a heapdump while a CPU profile is being generated and vice versa; an Error will be thrown if this is the case.
59
59
60
60
```javascript
61
61
let nodeOomHeapdump =require("node-oom-heapdump")({
@@ -67,7 +67,7 @@ let nodeOomHeapdump = require("node-oom-heapdump")({
67
67
* @param{String}snapshotPath - path of the snapshot
68
68
* @return{Promise} Promise containing the heap snapshot path on success or error on rejection
0 commit comments