(&self)
| 345 | |
| 346 | impl 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 { |
nothing calls this directly
no outgoing calls
no test coverage detected