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

Function getPostingCardinality

pkg/ingester/user_state.go:206–216  ·  view source on GitHub ↗
(p index.Postings)

Source from the content-addressed store, hash-verified

204}
205
206func getPostingCardinality(p index.Postings) (int, error) {
207 totalCount := 0
208 for p.Next() {
209 totalCount++
210 }
211
212 if p.Err() != nil {
213 return 0, p.Err()
214 }
215 return totalCount, nil
216}
217
218func (m *labelSetCounter) increaseSeriesLabelSet(u *userTSDB, metric labels.Labels) {
219 limits := m.limiter.limitsPerLabelSets(u.userID, metric)

Callers 2

Calls 2

NextMethod · 0.65
ErrMethod · 0.65

Tested by 1