pub struct MemtableEntry {
pub measurement: Arc<str>,
pub tags: Arc<[(Arc<str>, Arc<str>)]>,
pub fields: Box<[(Arc<str>, FieldValue)]>,
}Expand description
Value stored in the memtable’s skip list alongside each key.
Holds one point’s fields. Measurement names, tag keys, tag values and
field keys are interned Arc<str>s, and the whole tag set is one
Arc<[..]> shared by every point of the series in this memtable — a
series’ tags do not change from point to point, so storing them per
point stored the same thing a thousand times an hour.
Not BTreeMaps: a one-entry BTreeMap allocates a leaf node sized for
eleven, which is ~800 bytes per point of tree nodes nothing uses.
memtable_estimate_tracks_real_allocation holds the size estimate to the
allocator’s number within a quarter.
Fields§
§measurement: Arc<str>Measurement name (interned).
Tag key-value pairs, sorted by key, shared per series.
fields: Box<[(Arc<str>, FieldValue)]>Field name (interned) → field value, sorted by name.
Implementations§
Source§impl MemtableEntry
impl MemtableEntry
Sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Heap bytes this entry owns exclusively — the struct itself and its fields slice. Interned strings and the shared tag set are accounted for once, where they are interned, not per point.
Trait Implementations§
Source§impl Clone for MemtableEntry
impl Clone for MemtableEntry
Source§fn clone(&self) -> MemtableEntry
fn clone(&self) -> MemtableEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MemtableEntry
impl RefUnwindSafe for MemtableEntry
impl Send for MemtableEntry
impl Sync for MemtableEntry
impl Unpin for MemtableEntry
impl UnsafeUnpin for MemtableEntry
impl UnwindSafe for MemtableEntry
Blanket Implementations§
impl<T> Allocation for T
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