Skip to content

Commit

Permalink
Emit join timings
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Jun 16, 2015
1 parent 91c5dad commit 0c16243
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion lib/swim/join-sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c16243

Please sign in to comment.