pub struct HistogramBuilder { /* private fields */ }
Expand description
Histogram
builder.
Implementations§
Source§impl HistogramBuilder
impl HistogramBuilder
Sourcepub fn with_linear_buckets(
name: &str,
start: f64,
width: f64,
count: usize,
) -> Self
pub fn with_linear_buckets( name: &str, start: f64, width: f64, count: usize, ) -> Self
Makes a builder with the specified linear buckets.
Sourcepub fn with_exponential_buckets(
name: &str,
start: f64,
factor: f64,
count: usize,
) -> Self
pub fn with_exponential_buckets( name: &str, start: f64, factor: f64, count: usize, ) -> Self
Makes a builder with the specified exponential buckets.
Sourcepub fn namespace(&mut self, namespace: &str) -> &mut Self
pub fn namespace(&mut self, namespace: &str) -> &mut Self
Sets the namespace part of the metric name of this.
Sourcepub fn subsystem(&mut self, subsystem: &str) -> &mut Self
pub fn subsystem(&mut self, subsystem: &str) -> &mut Self
Sets the subsystem part of the metric name of this.
Sourcepub fn label(&mut self, name: &str, value: &str) -> &mut Self
pub fn label(&mut self, name: &str, value: &str) -> &mut Self
Adds a label.
Note that name
will be validated in the invocation of the finish
method.
The name "le"
is reserved for designating buckets.
Sourcepub fn registry(&mut self, registry: Registry) -> &mut Self
pub fn registry(&mut self, registry: Registry) -> &mut Self
Adds a registry to which the resulting histograms will be registered..
Sourcepub fn default_registry(&mut self) -> &mut Self
pub fn default_registry(&mut self) -> &mut Self
Adds the default registry.
Sourcepub fn buckets<I: IntoIterator<Item = f64>>(
&mut self,
upper_bounds: I,
) -> &mut Self
pub fn buckets<I: IntoIterator<Item = f64>>( &mut self, upper_bounds: I, ) -> &mut Self
Adds a sequence of buckets.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HistogramBuilder
impl RefUnwindSafe for HistogramBuilder
impl Send for HistogramBuilder
impl Sync for HistogramBuilder
impl Unpin for HistogramBuilder
impl UnwindSafe for HistogramBuilder
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