()
| 2329 | } |
| 2330 | |
| 2331 | func (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. |
| 2349 | func (i *Ingester) AllUserStatsHandler(w http.ResponseWriter, r *http.Request) { |
no test coverage detected