Get comprehensive statistics including both statement pool and optimization metrics
(&self)
| 254 | |
| 255 | /// Get comprehensive statistics including both statement pool and optimization metrics |
| 256 | pub fn get_comprehensive_stats(&self) -> StatementCacheStats { |
| 257 | let pool_stats = self.statement_pool.get_stats(); |
| 258 | let optimization_stats = self.optimization_manager.get_stats(); |
| 259 | let cache_info = self.statement_pool.get_cache_info(); |
| 260 | |
| 261 | StatementCacheStats { |
| 262 | pool_stats, |
| 263 | optimization_stats, |
| 264 | cache_size: cache_info.0, |
| 265 | max_cache_size: cache_info.1, |
| 266 | cache_utilization: cache_info.0 as f64 / cache_info.1 as f64, |
| 267 | overall_hit_rate: cache_info.2, |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | /// Clear statement cache (useful for DDL operations or testing) |
| 272 | pub fn clear_cache(&self) { |