pub struct MetricDb {
pub flat_dict: HashMap<Labels, Vec<Metric>>,
pub dict_by_label_types: HashMap<Vec<String>, BTreeMap<Vec<String>, Vec<Metric>>>,
}
Fields§
§flat_dict: HashMap<Labels, Vec<Metric>>
§dict_by_label_types: HashMap<Vec<String>, BTreeMap<Vec<String>, Vec<Metric>>>
Implementations§
Source§impl MetricDb
impl MetricDb
pub fn new(metrics_file: impl AsRef<Path>) -> Result<Self>
pub fn apply_aggregations(&mut self)
pub fn add_to_flat_dict(&mut self, labels: Labels, metric: String, value: f64)
pub fn custom_sort_label_keys(label_keys: &mut [String])
pub fn separate_by_label_types(&mut self)
pub fn generate_markdown_tables(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetricDb
impl RefUnwindSafe for MetricDb
impl Send for MetricDb
impl Sync for MetricDb
impl Unpin for MetricDb
impl UnwindSafe for MetricDb
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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