Struct heatmap::Config [] [src]

pub struct Config {
    // some fields omitted
}

A configuration struct for building custom Heatmaps.

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(&mut self, precision: u32) -> &mut Self

set the number of significant figures to mantain for values

fn max_memory(&mut self, bytes: u32) -> &mut Self

set a bound on memory usage of Heatmap

fn max_value(&mut self, value: u64) -> &mut Self

set the max value to store within the Heatmap

fn slice_duration(&mut self, duration: u64) -> &mut Self

set the duration of each Slice within the Heatmap

fn num_slices(&mut self, count: usize) -> &mut Self

set the number of Slices to store

fn start(&mut self, time: u64) -> &mut 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 Copy for Config
[src]

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

impl Default for Config
[src]

fn default() -> Config

Returns the "default value" for a type. Read more