(u *userTSDB, metric labels.Labels)
| 216 | } |
| 217 | |
| 218 | func (m *labelSetCounter) increaseSeriesLabelSet(u *userTSDB, metric labels.Labels) { |
| 219 | limits := m.limiter.limitsPerLabelSets(u.userID, metric) |
| 220 | for _, l := range limits { |
| 221 | s := m.shards[util.HashFP(model.Fingerprint(l.Hash))%numMetricCounterShards] |
| 222 | s.Lock() |
| 223 | if e, ok := s.valuesCounter[l.Hash]; ok { |
| 224 | e.count++ |
| 225 | } else { |
| 226 | s.valuesCounter[l.Hash] = &labelSetCounterEntry{ |
| 227 | count: 1, |
| 228 | labels: l.LabelSet, |
| 229 | } |
| 230 | } |
| 231 | s.Unlock() |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | func (m *labelSetCounter) decreaseSeriesLabelSet(u *userTSDB, metric labels.Labels) { |
| 236 | limits := m.limiter.limitsPerLabelSets(u.userID, metric) |
no test coverage detected