MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Labels

Method Labels

internal/trackers/manager.go:35–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35func (this *Manager) Labels() map[string]float64 {
36 var result = map[string]float64{}
37 this.locker.Lock()
38 for label, costs := range this.m {
39 var sum float64
40 for _, cost := range costs {
41 sum += cost
42 }
43 result[label] = sum / float64(len(costs))
44 }
45 this.locker.Unlock()
46 return result
47}

Callers 3

TestNewManagerFunction · 0.80
TestTrackers_AddFunction · 0.80
listenSockMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 2

TestNewManagerFunction · 0.64
TestTrackers_AddFunction · 0.64