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

Method get_comprehensive_stats

src/optimization/statement_cache_optimizer.rs:256–269  ·  view source on GitHub ↗

Get comprehensive statistics including both statement pool and optimization metrics

(&self)

Source from the content-addressed store, hash-verified

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) {

Callers 2

maintenanceMethod · 0.80

Calls 2

get_statsMethod · 0.45
get_cache_infoMethod · 0.45

Tested by 1