From f102185e0a6bb52ca9724180906507d5ae989913 Mon Sep 17 00:00:00 2001 From: cubedro Date: Mon, 4 May 2015 18:36:24 +0300 Subject: [PATCH] added timestamp console.logs --- lib/node.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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)