Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit 5cf9d69

Browse files
committed
Merge pull request #283 from uber/motiejus-lookupN
Emit lookupN timing event
2 parents 4d5f833 + 6bf0239 commit 5cf9d69

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,10 @@ RingPop.prototype.lookupN = function lookupN(key, n) {
514514

515515
var dests = this.ring.lookupN(key + '', n);
516516

517+
var timing = Date.now() - startTime;
518+
this.stat('timing', 'lookupn.' + n, timing);
517519
this.emit('lookupN', {
518-
timing: Date.now() - startTime
520+
timing: timing
519521
});
520522

521523
if (!dests || dests.length === 0) {

0 commit comments

Comments
 (0)