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

Method getMemorySeriesMetric

pkg/ingester/ingester.go:3117–3131  ·  view source on GitHub ↗

getMemorySeriesMetric returns the total number of in-memory series across all open TSDBs.

()

Source from the content-addressed store, hash-verified

3115
3116// getMemorySeriesMetric returns the total number of in-memory series across all open TSDBs.
3117func (i *Ingester) getMemorySeriesMetric() float64 {
3118 if err := i.checkRunning(); err != nil {
3119 return 0
3120 }
3121
3122 i.stoppedMtx.RLock()
3123 defer i.stoppedMtx.RUnlock()
3124
3125 count := uint64(0)
3126 for _, db := range i.TSDBState.dbs {
3127 count += db.Head().NumSeries()
3128 }
3129
3130 return float64(count)
3131}
3132
3133// getOldestUnshippedBlockMetric returns the unix timestamp of the oldest unshipped block or
3134// 0 if all blocks have been shipped.

Callers

nothing calls this directly

Implementers 1

Ingesterpkg/ingester/ingester.go

Calls 2

checkRunningMethod · 0.95
HeadMethod · 0.80

Tested by

no test coverage detected