MCPcopy Create free account
hub / github.com/buraksezer/consistent / AverageLoad

Method AverageLoad

consistent.go:168–173  ·  view source on GitHub ↗

AverageLoad exposes the current average load.

()

Source from the content-addressed store, hash-verified

166
167// AverageLoad exposes the current average load.
168func (c *Consistent) AverageLoad() float64 {
169 c.mu.RLock()
170 defer c.mu.RUnlock()
171
172 return c.averageLoad()
173}
174
175func (c *Consistent) averageLoad() float64 {
176 if len(c.members) == 0 {

Callers 3

TestConsistentLoadFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

averageLoadMethod · 0.95

Tested by 1

TestConsistentLoadFunction · 0.64