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

Method estimate_size

src/cache/ttl_cache.rs:548–553  ·  view source on GitHub ↗

Estimate the size of a value in bytes

(&self, _value: &V)

Source from the content-addressed store, hash-verified

546
547 /// Estimate the size of a value in bytes
548 fn estimate_size(&self, _value: &V) -> usize {
549 // This is a simple estimation. In a real implementation,
550 // you might want to implement a trait for size estimation
551 // or use more sophisticated memory profiling
552 std::mem::size_of::<V>() + 64 // Base overhead estimate
553 }
554
555 /// Get all keys currently in the cache (for debugging)
556 pub fn keys(&self) -> Vec<K> {

Callers 1

insert_with_ttlMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected