mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
a
This commit is contained in:
parent
e95625e8e8
commit
bc317657ab
@ -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);
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user