Approximate memory usage for a specific collection. Sums the hash table's own `mem_usage()` estimate; returns 0 if no table exists for `(tenant_id, collection)`.
(&self, tenant_id: u64, collection: &str)
| 126 | /// hash table's own `mem_usage()` estimate; returns 0 if no table |
| 127 | /// exists for `(tenant_id, collection)`. |
| 128 | pub fn collection_mem_usage(&self, tenant_id: u64, collection: &str) -> u64 { |
| 129 | let tkey = table_key(tenant_id, collection); |
| 130 | self.tables |
| 131 | .get(&tkey) |
| 132 | .map(|t| t.mem_usage() as u64) |
| 133 | .unwrap_or(0) |
| 134 | } |
| 135 | |
| 136 | /// Comprehensive observability snapshot for this KV engine. |
| 137 | pub fn stats(&self) -> KvStats { |
no test coverage detected