MCPcopy Create free account
hub / github.com/cortexproject/cortex / newMetricCounter

Function newMetricCounter

pkg/ingester/user_state.go:39–52  ·  view source on GitHub ↗
(limiter *Limiter, ignoredMetricsForSeriesCount map[string]struct{})

Source from the content-addressed store, hash-verified

37}
38
39func newMetricCounter(limiter *Limiter, ignoredMetricsForSeriesCount map[string]struct{}) *metricCounter {
40 shards := make([]metricCounterShard, 0, numMetricCounterShards)
41 for range numMetricCounterShards {
42 shards = append(shards, metricCounterShard{
43 m: map[string]int{},
44 })
45 }
46 return &metricCounter{
47 limiter: limiter,
48 shards: shards,
49
50 ignoredMetrics: ignoredMetricsForSeriesCount,
51 }
52}
53
54func (m *metricCounter) decreaseSeriesForMetric(metricName string) {
55 shard := m.getShard(metricName)

Callers 2

TestMetricCounterFunction · 0.85
createTSDBMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestMetricCounterFunction · 0.68