pub struct Report {
pub high_cno: Cno,
pub latest_compacted: bool,
pub data_block_size: usize,
pub meta_block_size: usize,
pub objects: Vec<ObjectUsage>,
pub out_of_range: usize,
pub foreign_keys: usize,
pub foreign_sample: Option<String>,
}Expand description
What a container’s storage is made of, and what could be given back.
Fields§
§high_cno: CnoThe checkpoint the walk was taken from.
latest_compacted: boolWhether the newest published checkpoint is itself a compaction
(InodeRaw::FLAG_COMPACTED). compact will not run on top of one unless
asked to, since a second pass in a row moves content_cno.
data_block_size: usize§meta_block_size: usize§objects: Vec<ObjectUsage>Objects whose checkpoint falls in the queried [low, high], ascending.
out_of_range: usizeObjects outside that range, which no operation here will touch.
foreign_keys: usizeKeys under the container’s prefix that are neither the inode nor a segment object. A WAL root nested under the container is the usual reason, and compaction refuses to run while any are present.
foreign_sample: Option<String>Implementations§
Source§impl Report
impl Report
Sourcepub fn bytes_live(&self) -> u64
pub fn bytes_live(&self) -> u64
Bytes still pointed into.
Sourcepub fn dead(&self) -> (usize, u64)
pub fn dead(&self) -> (usize, u64)
Objects nothing points into, and what they hold. This is prune’s work,
and it needs no rewrite.
Sourcepub fn compactable(&self, max_live_ratio: f64) -> (usize, u64, u64)
pub fn compactable(&self, max_live_ratio: f64) -> (usize, u64, u64)
What compaction at max_live_ratio would cost and free: (objects, bytes_to_rewrite, bytes_freed).
An estimate from the same numbers S3Cleaner::compact selects by, so a
dry run and this agree. The bytes freed are the objects’ own, which
prune collects afterwards; the rewrite itself publishes a new checkpoint
holding the live blocks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnsafeUnpin for Report
impl UnwindSafe for Report
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more