pub struct Procession {
pub chunks: Vec<Chunk>,
pub labels: LabelSet,
}Expand description
This represents a time series of metrics collected over some length of time
Fields§
§chunks: Vec<Chunk>The series of chunks representing ~65 seconds of time in each chunk
labels: LabelSetThe set of all unique keys and labels currently in the set
Implementations§
Source§impl Procession
impl Procession
Sourcepub fn memory_size(&self) -> usize
pub fn memory_size(&self) -> usize
A naive attempt to calculate the memory size of the current state
Sourcepub fn insert_entry(&mut self, entry: Entry, label: u16)
pub fn insert_entry(&mut self, entry: Entry, label: u16)
Insert a new entry into the last (or newly last) Chunk
Sourcepub fn last_chunk_and_ms(&mut self, now: OffsetDateTime) -> (&mut Chunk, u16)
pub fn last_chunk_and_ms(&mut self, now: OffsetDateTime) -> (&mut Chunk, u16)
Find the last chunk in this Procession along with the number of milliseconds since the reference time on that chunk. If either there are no chunks already available or the number of milliseconds since the last chunk’s reference time would exceed u16::MAX a new chunk is added and a mutable reference to that chunk is returned with a ms value of 0
Sourcepub fn ensure_label(&mut self, k: &Key) -> u16
pub fn ensure_label(&mut self, k: &Key) -> u16
Ensure the provided key is in the [labels]
Sourcepub fn iter(&self) -> MetricsRefIterator<'_> ⓘ
pub fn iter(&self) -> MetricsRefIterator<'_> ⓘ
create an iterator for the raw metric events currently recorded that will be tied to the
lifetime of this instance of the Procession
Sourcepub fn iter_owned(&self) -> MetricsIterator<'_> ⓘ
pub fn iter_owned(&self) -> MetricsIterator<'_> ⓘ
create an iterator for the raw metric events currently recorded providing owned version of all events
Trait Implementations§
Source§impl Clone for Procession
impl Clone for Procession
Source§fn clone(&self) -> Procession
fn clone(&self) -> Procession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more