Struct heatmap::Config
[−]
[src]
pub struct Config { /* fields omitted */ }
A configuration struct for building custom Heatmap
s.
Methods
impl Config
[src]
fn new() -> Config
create a new Config with the defaults
Defaults
- precision => 3
- max_memory => 0 (unlimited)
- max_value => 1_000_000_000 (1 second in nanoseconds)
- slice_duration => 60_000_000_000 (1 minute in nanoseconds)
- num_slices => 60 (1 hour of heatmap)
- start => 0 (start from time 0)
fn precision(self, precision: u32) -> Self
set the number of significant figures to mantain for values
fn max_memory(self, bytes: u32) -> Self
set a bound on memory usage of Heatmap
fn max_value(self, value: u64) -> Self
set the max value to store within the Heatmap
fn slice_duration(self, duration: u64) -> Self
set the duration of each Slice
within the Heatmap
fn num_slices(self, count: usize) -> Self
set the number of Slice
s to store
fn start(self, time: u64) -> Self
the start time of the Heatmap
, used for Slice
indexing
fn build(self) -> Option<Heatmap>
creates the Heatmap
from the Config
Trait Implementations
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more