mirror of
https://github.com/amark/gun.git
synced 2025-06-06 22:26:48 +00:00
add debug environment
This commit is contained in:
parent
d56c80cccf
commit
36016cdf57
11
lib/debug.js
Normal file
11
lib/debug.js
Normal file
@ -0,0 +1,11 @@
|
||||
;(function(){
|
||||
if('debug' !== process.env.GUN_ENV){ return }
|
||||
|
||||
setInterval(function(){
|
||||
var mem = process.memoryUsage();
|
||||
var used = mem.heapUsed / 1024 / 1024;
|
||||
used = used.toFixed(1);
|
||||
console.log(used, 'MB');
|
||||
}, 1000);
|
||||
|
||||
}());
|
@ -8,5 +8,6 @@
|
||||
require('./verify');
|
||||
require('./file');
|
||||
require('./bye');
|
||||
if('debug' === process.env.GUN_ENV){ require('./debug') }
|
||||
module.exports = Gun;
|
||||
}());
|
Loading…
x
Reference in New Issue
Block a user