Struct histogram::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
A configuration struct for building custom Histogram
s.
Methods
impl Config
[src]
pub fn new() -> Config
[src]
pub fn precision(self, precision: u32) -> Self
[src]
set HistogramConfig precision
Example
let mut c = Histogram::configure(); c.precision(4); // set to 4 significant figures
pub fn max_memory(self, bytes: u32) -> Self
[src]
set HistogramConfig memory limit
Example
let mut c = Histogram::configure(); c.max_memory(1024*1024); // cap Histogram at 1MB of data
pub fn max_value(self, max: u64) -> Self
[src]
set HistogramConfig value limit
Example
let mut c = Histogram::configure(); c.max_value(1000); // values above 1000 will not be stored
pub fn build(self) -> Option<Histogram>
[src]
Build a new histogram based on the current configuration
values. Return None
if the new histogram would require more
than the configured memory size.
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more