(mll *metricAndAPPLabelLayout, n int)
| 240 | } |
| 241 | |
| 242 | func resetLayoutState(mll *metricAndAPPLabelLayout, n int) { |
| 243 | newActive := make(map[LayoutKey]uint8, n) |
| 244 | for i := 0; i < n; i++ { |
| 245 | newActive[NewLayoutKey(fmt.Sprintf("metric_%d", i/10), fmt.Sprintf("app_label_%d", i%10))] = uint8(i%10 + 1) |
| 246 | } |
| 247 | mll.mu.Lock() |
| 248 | mll.pending = make(map[LayoutKey]uint8) |
| 249 | mll.mu.Unlock() |
| 250 | mll.replaceActive(newActive) |
| 251 | } |
| 252 | |
| 253 | func refreshLabelCurrent(l *label, batch []*controller.PrometheusLabel) { |
| 254 | l.Add(batch) |
no test coverage detected