Return statistics about the table for debugging and logging. # Examples ```rust use atomic_core::change::format_v3::HashDedupTable; let mut table = HashDedupTable::new([0u8; 32]); table.insert([1u8; 32]).unwrap(); table.insert([2u8; 32]).unwrap(); let stats = table.stats(); assert_eq!(stats.entry_count, 3); assert_eq!(stats.dependency_count, 2); assert_eq!(stats.serialized_bytes, 96); ```
(&self)
| 687 | /// assert_eq!(stats.serialized_bytes, 96); |
| 688 | /// ``` |
| 689 | pub fn stats(&self) -> HashDedupTableStats { |
| 690 | let entry_count = self.hashes.len(); |
| 691 | HashDedupTableStats { |
| 692 | entry_count, |
| 693 | dependency_count: entry_count.saturating_sub(1), |
| 694 | serialized_bytes: entry_count * HASH_SIZE, |
| 695 | } |
| 696 | } |
| 697 | } |
| 698 | |
| 699 | impl fmt::Debug for HashDedupTable { |