Perform periodic maintenance
(&self)
| 292 | |
| 293 | /// Perform periodic maintenance |
| 294 | pub fn maintenance(&self) { |
| 295 | if !self.enabled { |
| 296 | return; |
| 297 | } |
| 298 | |
| 299 | let stats = self.get_comprehensive_stats(); |
| 300 | |
| 301 | // Log statistics if cache is being actively used |
| 302 | if stats.pool_stats.total_queries > 0 { |
| 303 | info!("Statement cache maintenance - Hit rate: {:.1}%, Utilization: {:.1}%, Total queries: {}", |
| 304 | stats.overall_hit_rate * 100.0, |
| 305 | stats.cache_utilization * 100.0, |
| 306 | stats.pool_stats.total_queries); |
| 307 | } |
| 308 | |
| 309 | // Trigger optimization manager maintenance as well |
| 310 | self.optimization_manager.maintenance(); |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | /// Combined statistics from statement caching and query optimization |
nothing calls this directly
no test coverage detected