[−][src]Struct exponential_decay_histogram::Builder
A builder type for ExponentialDecayHistogram objects.
Implementations
impl Builder[src]
pub fn at(&mut self, now: Instant) -> &mut Self[src]
Sets the construction time of the histogram.
Defaults to the system time when the Builder was constructed.
pub fn size(&mut self, size: usize) -> &mut Self[src]
Sets the size of the histogram.
A larger size will provide a more accurate histogram, but with a higher memory overhead.
Defaults to 1028, which offers a 99.9% confidence level with a 5% margin of error.
Panics
Panics if size is 0.
pub fn alpha(&mut self, alpha: f64) -> &mut Self[src]
Sets the decay rate of the histogram.
A larger value biases the histogram towards newer values.
Defaults to 0.015, which heavily biases towards the last 5 minutes of values.
pub fn build(&self) -> ExponentialDecayHistogram[src]
Creates a new ExponentialDecayHistogram.
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,