Merge pull request #102 from cubedro/develop

Added timestamp console.logs
This commit is contained in:
Marian OANCΞA 2015-05-04 18:36:41 +03:00
commit 84c8138910

View File

@ -357,13 +357,20 @@ Node.prototype.uptime = function()
Node.prototype.getStats = function()
{
var start = _.now();
console.log('==> statsstart: ', start);
if(this._socket)
this._lastStats = JSON.stringify(this.stats);
// if(this.isActive())
if(this._web3)
{
var blockStart = _.now();
console.log('==> blockstart: ', blockStart);
console.log('==> blockstart diff: ', (blockStart - start));
var block = this.getBlock();
var blockEnd = _.now();
console.log('==> blockend: ', blockEnd);
console.log('==> block diff: ', (blockEnd - blockStart));
if( !_.isUndefined(block) && !_.isUndefined(block.number) && !_.isUndefined(block.hash) && block.hash !== '?' )
{
@ -409,6 +416,10 @@ Node.prototype.getStats = function()
}
this.uptime();
var end = _.now();
console.log('==> end: ', end);
console.log('==> stats diff: ', (start - end));
}
Node.prototype.getHistory = function(range)