diff --git a/lib/node.js b/lib/node.js index 34626ca..fe64ceb 100644 --- a/lib/node.js +++ b/lib/node.js @@ -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)