Struct tic::Config [] [src]

pub struct Config<T> {
    pub duration: usize,
    pub windows: usize,
    pub capacity: usize,
    pub http_listen: Option<String>,
    pub trace_file: Option<String>,
    pub waterfall_file: Option<String>,
    pub heatmap_config: Config,
    pub histogram_config: Config,
    // some fields omitted
}

a configuration struct for customizing Receiver

Fields

Methods

impl<T: Hash + Eq + Send + Display + Clone> Config<T>
[src]

create a new tic Config with defaults

Example

let mut c = Receiver::<usize>::configure();

set integration window in seconds: default 60

Example

let mut c = Receiver::<usize>::configure();
c.duration(60); // set to 60 second integration window

set number of windows to collect: default 60

Example

let mut c = Receiver::<usize>::configure();
c.windows(60); // collect for 60 x duration and terminate

set capacity of the queue: default 1000

Example

let mut c = Receiver::<usize>::configure();
c.capacity(1000); // buffer for 1000 metrics

set the http lister address

Example

let mut c = Receiver::<usize>::configure();
c.http_listen("0.0.0.0:42024".to_owned()); // listen on port 42024 on all interfaces

set the heatmap trace file

Example

let mut c = Receiver::<usize>::configure();
c.trace_file("/tmp/heatmap.trace".to_owned()); // heatmap trace will write here

set the heatmap trace file

Example

let mut c = Receiver::<usize>::configure();
c.waterfall_file("/tmp/waterfall.png".to_owned()); // waterfall png will render here

Build a new Receiver based on the current configuration

Trait Implementations

impl<T: Clone> Clone for Config<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Hash + Eq + Send + Display + Clone> Default for Config<T>
[src]

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