This commit is contained in:
Mark Nadal 2020-09-19 19:25:00 -07:00
parent e95625e8e8
commit bc317657ab
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@
var data = await (await fetch(url.value||(location.origin+'/gun/stats.radata'), {method: 'GET',mode: 'cors'})).json();
$('#block').text(((br += (+new Date - S)/1000) / ++bt).toFixed(1));
data.over = (data.over/1000) || 15;
$('#stack').text(data.cpu.stack);
$('#stack').text((data.cpu||'').stack);
$('#peers').text(data.peers.count);
$('#time').text((data.peers.time / 1000 / 60).toFixed(0));
$('#nodes').text(data.node.count);

View File

@ -66,7 +66,7 @@ Gun.on('opt', function(root){
stats.over = S;
stats.gap = {};
exec("top -b -n 1", function(err, out){ out && fs.writeFile(__dirname+'/../stats.top.'+root.opt.file, out, noop) });
exec("top -b -n 1", function(err, out){ out && fs.writeFile(__dirname+'/../stats.top.'+(root.opt.file||file), out, noop) });
}, 1000 * 15);
});