pub struct Spent { /* private fields */ }Expand description
How long each stage took and how many bytes went through it.
The bytes are here rather than worked out later because a rate is the number that says whether a stage is slow. Two hundred milliseconds of decompression is a fact about a query and two hundred megabytes a second is a fact about the decompressor, and only the second one can be compared against anything.
Implementations§
Source§impl Spent
impl Spent
Sourcepub const fn none() -> Self
pub const fn none() -> Self
Nothing measured, which is what every operator that is not a scan reports.
Sourcepub fn taken(&self) -> impl Iterator<Item = (Stage, u64, u64)> + '_
pub fn taken(&self) -> impl Iterator<Item = (Stage, u64, u64)> + '_
Every stage that did something, in the order Stage::ALL lists them.
The order is the order the bytes go through the stages rather than largest first, because
this is what the document is written from and a document whose keys move with its numbers is
one nobody can diff. Whoever wants the largest asks Self::worst.
Sourcepub fn worst(&self) -> Option<(Stage, u64)>
pub fn worst(&self) -> Option<(Stage, u64)>
The stage holding the most time, or none if nothing was measured.