MCPcopy Create free account
hub / github.com/cosdata/cosdata / should_evict

Method should_evict

src/models/lru_cache.rs:130–133  ·  view source on GitHub ↗
(&self, global_counter: u32, counter_value: u32)

Source from the content-addressed store, hash-verified

128 }
129
130 fn should_evict(&self, global_counter: u32, counter_value: u32) -> bool {
131 let eviction_prob = self.eviction_probability(global_counter, counter_value);
132 eviction_prob > rand::thread_rng().gen()
133 }
134}
135
136#[allow(unused)]

Callers

nothing calls this directly

Calls 1

eviction_probabilityMethod · 0.80

Tested by

no test coverage detected