MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / reconstruct_bytes_used_by_rows

Method reconstruct_bytes_used_by_rows

crates/table/src/table.rs:1693–1702  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1691
1692 #[cfg(test)]
1693 fn reconstruct_bytes_used_by_rows(&self) -> u64 {
1694 self.pages()
1695 .iter()
1696 .map(|page| unsafe {
1697 // Safety: `page` is in `self`, and was constructed using `self.innser.row_layout` and `self.inner.visitor_prog`,
1698 // so the three are mutually consistent.
1699 page.reconstruct_bytes_used_by_rows(self.inner.row_layout.size(), &self.inner.visitor_prog)
1700 } as u64)
1701 .sum()
1702 }
1703
1704 /// Returns the number of indices in this table.
1705 pub fn num_indices(&self) -> usize {

Callers

nothing calls this directly

Calls 5

pagesMethod · 0.80
iterMethod · 0.65
sumMethod · 0.45
mapMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected