pub struct Builder { /* private fields */ }
Expand description
A Builder
allows for constructing a Histogram
with the desired
configuration.
Implementations§
source§impl Builder
impl Builder
sourcepub fn min_resolution(self, width: u64) -> Self
pub fn min_resolution(self, width: u64) -> Self
Sets the width of the smallest bucket in the Histogram
.
As the Histogram
uses base-2 internally, the resolution will be the
largest power of two that is less than or equal to the provided value.
For example, if the minimum resolution is set to 10, the width of the
smallest bucket will be 8.
sourcepub fn min_resolution_range(self, value: u64) -> Self
pub fn min_resolution_range(self, value: u64) -> Self
Sets the maximum value that the minimum resolution extends to.
This value should be greater than the minimum resolution. If the value provided is not a power of two, the smallest power of two that is larger than the provided value will be used.
sourcepub fn maximum_value(self, value: u64) -> Self
pub fn maximum_value(self, value: u64) -> Self
Sets the maximum value that can be recorded into the Histogram
.
If the value provided is not a power of two, the smallest power of two that is larger than the provided value will be used.