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

Method isIdle

pkg/ingester/ingester.go:659–663  ·  view source on GitHub ↗
(now time.Time, idle time.Duration)

Source from the content-addressed store, hash-verified

657}
658
659func (u *userTSDB) isIdle(now time.Time, idle time.Duration) bool {
660 lu := u.lastUpdate.Load()
661
662 return time.Unix(lu, 0).Add(idle).Before(now)
663}
664
665func (u *userTSDB) setLastUpdate(t time.Time) {
666 u.lastUpdate.Store(t.Unix())

Callers 2

shouldCloseTSDBMethod · 0.95
compactBlocksMethod · 0.80

Calls 3

LoadMethod · 0.80
BeforeMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected