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

Method hit_rate

graphlite/src/cache/subquery_cache.rs:347–354  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

345
346impl SubqueryCacheStats {
347 pub fn hit_rate(&self) -> f64 {
348 let total = self.hits + self.misses;
349 if total == 0 {
350 0.0
351 } else {
352 self.hits as f64 / total as f64
353 }
354 }
355
356 pub fn average_time_saved_ms(&self) -> f64 {
357 if self.hits == 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected