(&self)
| 264 | } |
| 265 | |
| 266 | pub fn stats(&self) -> MemtableStats { |
| 267 | let mut s = MemtableStats::default(); |
| 268 | for b in self.tiles.values() { |
| 269 | s.tile_count += 1; |
| 270 | s.cell_count += b.live_cell_count(); |
| 271 | s.max_lsn = s.max_lsn.max(b.last_lsn()); |
| 272 | } |
| 273 | s |
| 274 | } |
| 275 | |
| 276 | pub fn is_empty(&self) -> bool { |
| 277 | self.tiles.values().all(|b| b.entry_count() == 0) |