MCPcopy Create free account
hub / github.com/deepflowio/deepflow / resetLabelNameState

Function resetLabelNameState

server/controller/prometheus/cache/cache_test.go:231–240  ·  view source on GitHub ↗
(ln *labelName, n int)

Source from the content-addressed store, hash-verified

229}
230
231func resetLabelNameState(ln *labelName, n int) {
232 newActive := make(map[string]int, n)
233 for i := 0; i < n; i++ {
234 newActive[fmt.Sprintf("ln_%d", i)] = i + 1
235 }
236 ln.mu.Lock()
237 ln.pendingNameToID = make(map[string]int)
238 ln.mu.Unlock()
239 ln.replaceActive(newActive)
240}
241
242func resetLayoutState(mll *metricAndAPPLabelLayout, n int) {
243 newActive := make(map[LayoutKey]uint8, n)

Callers

nothing calls this directly

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
replaceActiveMethod · 0.45

Tested by

no test coverage detected