MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / hit_rate

Method hit_rate

graphlite/src/cache/result_cache.rs:180–186  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

178
179impl CacheStats {
180 pub fn hit_rate(&self) -> f64 {
181 if self.total_requests == 0 {
182 0.0
183 } else {
184 (self.l1_hits + self.l2_hits) as f64 / self.total_requests as f64
185 }
186 }
187
188 pub fn l1_hit_rate(&self) -> f64 {
189 if self.total_requests == 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected