Skip to content

Commit

Permalink
use BucketContext & record utilization on removal
Browse files Browse the repository at this point in the history
  • Loading branch information
yusefnapora committed Jul 29, 2019
1 parent 9e2000b commit 189b505
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions table.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ func (rt *RoutingTable) RemoveCtx(ctx context.Context, p peer.ID) {

bucket := rt.Buckets[bucketID]
if bucket.Remove(p) {
ctx = metrics.BucketContext(ctx, rt.local, bucketID)
metrics.RecordPeerRemoved(ctx, bucketID)
metrics.RecordBucketUtilization(ctx, bucket.Len())
rt.PeerRemoved(p)
}
}
Expand Down

0 comments on commit 189b505

Please sign in to comment.