diff --git a/README.md b/README.md index 8e332d28..0b99a6cc 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ ringpop emits stats using the `statsd` client provided to its constructor. All s **Timers** * `compute-checksum` - time it takes to compute checksum +* `join` - time it takes for node to join cluster * `ping` - response times of a ping * `ping-req` - response times of a ping-req * `ping-req-ping` - response times of a ping sent in response to a ping-req received diff --git a/lib/swim/join-sender.js b/lib/swim/join-sender.js index 2b334aef..8d4182ba 100644 --- a/lib/swim/join-sender.js +++ b/lib/swim/join-sender.js @@ -247,11 +247,14 @@ JoinCluster.prototype.join = function join(callback) { numGroups++; if (numJoined >= self.joinSize) { + var joinTime = Date.now() - startTime; + + self.ringpop.stat('timing', 'join', joinTime); self.ringpop.stat('increment', 'join.complete'); self.ringpop.logger.info('ringpop join complete', { local: self.ringpop.whoami(), joinSize: self.joinSize, - joinTime: Date.now() - startTime, + joinTime: joinTime, numJoined: numJoined, numGroups: numGroups, numFailed: numFailed