pub struct Compaction {
pub walked: u64,
pub moved: u64,
pub bytes: u64,
}Expand description
What compaction has done to a map over its life.
The write amplification of value separation, in the two parts it is actually made of. Every record the walk steps over costs a liveness probe whether it is live or not, and every live one it finds costs a copy on top of that, so a segment full of dead records and a segment full of live ones are different amounts of work for the same number of bytes. One counter cannot tell those apart, which is why there are three.
Counted here rather than in the caller because this is the only place that
knows a record moved, and the numbers are wanted per store rather than per
command. They never reset, including across RawMap::clear.
Fields§
§walked: u64Records the walk has stepped over, live and dead together.
moved: u64The ones that were still live and had to be copied somewhere else.
bytes: u64What those copies came to, headers and keys included.
Trait Implementations§
Source§impl Clone for Compaction
impl Clone for Compaction
Source§fn clone(&self) -> Compaction
fn clone(&self) -> Compaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more