pub struct ExponentialDecayHistogram { /* private fields */ }Expand description
A histogram which exponentially weights in favor of recent values.
See the crate level documentation for more details.
Implementations§
Source§impl ExponentialDecayHistogram
impl ExponentialDecayHistogram
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Returns a new builder to create a histogram with a custom configuration.
Sourcepub fn with_size_and_alpha(size: usize, alpha: f64) -> Self
👎Deprecated: use ExponentialDecayHistogram::builder() instead
pub fn with_size_and_alpha(size: usize, alpha: f64) -> Self
ExponentialDecayHistogram::builder() insteadReturns a new histogram configured with the specified size and alpha.
size specifies the number of values stored in the histogram. A larger
size will provide more accurate statistics, but with a higher memory
overhead.
alpha specifies the exponential decay factor. A larger factor biases
the histogram towards newer values.
§Panics
Panics if size is zero.
Trait Implementations§
Source§impl Debug for ExponentialDecayHistogram
impl Debug for ExponentialDecayHistogram
Source§impl Default for ExponentialDecayHistogram
impl Default for ExponentialDecayHistogram
Source§fn default() -> ExponentialDecayHistogram
fn default() -> ExponentialDecayHistogram
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExponentialDecayHistogram
impl RefUnwindSafe for ExponentialDecayHistogram
impl Send for ExponentialDecayHistogram
impl Sync for ExponentialDecayHistogram
impl Unpin for ExponentialDecayHistogram
impl UnwindSafe for ExponentialDecayHistogram
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