MCPcopy Create free account
hub / github.com/InferCore/InferCore / shouldEvictRecord

Method shouldEvictRecord

internal/slo/memory_engine.go:205–210  ·  view source on GitHub ↗
(rec *requestTiming, now time.Time)

Source from the content-addressed store, hash-verified

203}
204
205func (e *MemoryEngine) shouldEvictRecord(rec *requestTiming, now time.Time) bool {
206 if !rec.endTime.IsZero() {
207 return now.Sub(rec.endTime) > e.maxAge
208 }
209 return now.Sub(rec.insertedAt) > e.maxAge
210}
211
212func (e *MemoryEngine) evictOneOldestLocked(now time.Time) {
213 var oldestID string

Callers 1

evictLockedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected