MCPcopy Create free account
hub / github.com/erans/pgsqlite / maintenance

Method maintenance

src/optimization/statement_cache_optimizer.rs:294–311  ·  view source on GitHub ↗

Perform periodic maintenance

(&self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected