File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change 1
- var heapdump = require ( 'heapdump' )
2
1
var PouchDB = require ( 'pouchdb-core' )
3
2
4
3
var plugin = null
@@ -60,20 +59,8 @@ function measure() {
60
59
61
60
var run = setInterval ( function onMemleakInterval ( ) {
62
61
63
- global . gc ( ) ;
64
-
65
62
overall ++ ;
66
63
67
- if ( overall === max_waiting + max_counter + 10 ) {
68
- console . log ( 'heap dump' )
69
- heapdump . writeSnapshot ( plugin_name + '-middle.heapsnapshot' )
70
- }
71
-
72
- if ( waiting == 2 ) {
73
- console . log ( 'heap dump' )
74
- heapdump . writeSnapshot ( plugin_name + '-start.heapsnapshot' )
75
- }
76
-
77
64
if ( waiting > 0 ) {
78
65
waiting -- ;
79
66
measure ( ) ;
@@ -100,6 +87,4 @@ var run = setInterval(function onMemleakInterval() {
100
87
/* TIME_WAIT will stay for 4 minutes, so wait at least that long */
101
88
setTimeout ( function onFinalTimeout ( ) {
102
89
clearInterval ( run )
103
- console . log ( 'heap dump' )
104
- heapdump . writeSnapshot ( plugin_name + '-end.heapsnapshot' )
105
90
} , 300 * 1000 )
Original file line number Diff line number Diff line change 10
10
"author" : " Stéphane Alnet <stephane@shimaore.net> (https://stephane.shimaore.net/)" ,
11
11
"license" : " Unlicense" ,
12
12
"dependencies" : {
13
- "heapdump" : " ^0.3.7" ,
14
13
"pouchdb-adapter-http" : " ^6.0.7" ,
15
14
"pouchdb-core" : " ^6.0.7"
16
15
}
You can’t perform that action at this time.
0 commit comments