Skip to content

Commit

Permalink
Stat for lookup timing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Nov 6, 2015
1 parent 5c899bf commit 795f3c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,10 @@ RingPop.prototype.lookup = function lookup(key) {

var dest = this.ring.lookup(key + '');

var timing = Date.now() - startTime;
this.stat('timing', 'lookup', timing);
this.emit('lookup', {
timing: Date.now() - startTime
timing: timing
});

if (!dest) {
Expand Down

0 comments on commit 795f3c7

Please sign in to comment.