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

Method userStats

pkg/ingester/ingester.go:2331–2346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2329}
2330
2331func (i *Ingester) userStats() []UserIDStats {
2332 i.stoppedMtx.RLock()
2333 defer i.stoppedMtx.RUnlock()
2334
2335 users := i.TSDBState.dbs
2336
2337 response := make([]UserIDStats, 0, len(users))
2338 for id, db := range users {
2339 response = append(response, UserIDStats{
2340 UserID: id,
2341 UserStats: createUserStats(db, i.cfg.ActiveSeriesMetricsEnabled),
2342 })
2343 }
2344
2345 return response
2346}
2347
2348// AllUserStatsHandler shows stats for all users.
2349func (i *Ingester) AllUserStatsHandler(w http.ResponseWriter, r *http.Request) {

Callers 2

AllUserStatsHandlerMethod · 0.95
AllUserStatsMethod · 0.95

Implementers 1

Ingesterpkg/ingester/ingester.go

Calls 1

createUserStatsFunction · 0.85

Tested by

no test coverage detected