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
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +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
+
3
4
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
5
5
6
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/).
@@ -55,6 +56,7 @@ These might impact performance though.
55
56
56
57
# API
57
58
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.
59
+
58
60
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
61
60
62
```javascript
@@ -63,10 +65,10 @@ let nodeOomHeapdump = require("node-oom-heapdump")({
63
65
});
64
66
65
67
/**
66
-
* Returns the path to the created heap snapshot in a promise, or rejects on error
67
-
* @param{String}snapshotPath - path of the snapshot
68
-
* @return{Promise} Promise containing the heap snapshot path on success or error on rejection
69
-
*/
68
+
* Returns the path to the created heap snapshot in a promise, or rejects on error
69
+
* @param{String}snapshotPath - path of the snapshot
70
+
* @return{Promise} Promise containing the heap snapshot path on success or error on rejection
0 commit comments