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

Method evictLocked

internal/slo/memory_engine.go:193–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191}
192
193func (e *MemoryEngine) evictLocked() {
194 now := time.Now()
195 for id, rec := range e.records {
196 if e.shouldEvictRecord(rec, now) {
197 delete(e.records, id)
198 }
199 }
200 for len(e.records) > e.maxRecords {
201 e.evictOneOldestLocked(now)
202 }
203}
204
205func (e *MemoryEngine) shouldEvictRecord(rec *requestTiming, now time.Time) bool {
206 if !rec.endTime.IsZero() {

Callers 4

RecordStartMethod · 0.95
RecordFirstTokenMethod · 0.95
RecordCompletionMethod · 0.95
RecordFallbackMethod · 0.95

Calls 2

shouldEvictRecordMethod · 0.95
evictOneOldestLockedMethod · 0.95

Tested by

no test coverage detected