Get memory statistics
(&self)
| 263 | |
| 264 | /// Get memory statistics |
| 265 | pub async fn stats(&self) -> anyhow::Result<MemoryStats> { |
| 266 | Ok(MemoryStats { |
| 267 | long_term_count: self.store.count().await?, |
| 268 | short_term_count: self.short_term.read().await.len(), |
| 269 | working_count: self.working.read().await.len(), |
| 270 | }) |
| 271 | } |
| 272 | |
| 273 | /// Get access to the underlying store |
| 274 | pub fn store(&self) -> &Arc<dyn MemoryStore> { |