node-oom-heapdump 2.1.0-progress.0 → 3.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tests/oom_app.js DELETED
@@ -1,22 +0,0 @@
1
- let path = require('path');
2
-
3
- let oom = require("../index.js")({
4
- path: path.resolve(__dirname, 'my_heapdump'),
5
- heapdumpOnOOM: true,
6
- //OOMImplementation: "GC_MONITORING", // use the old implementation
7
- addTimestamp: false
8
- });
9
-
10
- // It is important to use named constructors (like the one below), otherwise
11
- // the heap snapshots will not produce useful outputs for you.
12
- function LeakingClass1() {
13
- }
14
-
15
- var leaks = [];
16
- var handle = setInterval(function () {
17
- for (var i = 0; i < 100000; i++) {
18
- leaks.push(new LeakingClass1);
19
- }
20
-
21
- console.error('Leaks: %d', leaks.length);
22
- }, 100);