Struct tic::Config [] [src]

pub struct Config<T> {
    pub duration: usize,
    pub windows: usize,
    pub capacity: usize,
    pub batch_size: usize,
    pub service_mode: bool,
    pub poll_delay: Option<Duration>,
    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

duration of a sampling interval (window) in seconds typical values are 1 or 60 for secondly or minutely reporting

the number of sampling intervals (windows) to aggregate in heatmap and traces. NOTE: The receiver will halt if service_mode is false and the total number of windows have elapsed

the capacity of the stats queue. Default: 256

the default batch size of a Sender. Default: 512

set continuous-run mode. heatmaps and traces will generate every N windows when this is set to true. If it is set to false, the Receiver will halt after N windows

set an optional delay between calls to poll

enable the HTTP stats export on the given address

save a latency heatmap trace to the given file

save a waterfal png of the latency heatmap to the given file

the shared Heatmap configuration

the shared Histogram configuration

Methods

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

[src]

create a new tic Config with defaults

Example

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

[src]

set integration window in seconds: default 60

Example

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

[src]

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

[src]

set capacity of the queue: default 256

Example

let mut c = Receiver::<usize>::configure();
c.capacity(256); // buffer for 256 batches of samples

[src]

set batch size of the sender: default 512

Example

let mut c = Receiver::<usize>::configure();
c.batch_size(512); // batch 512 samples in one queue write

[src]

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

[src]

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

[src]

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

[src]

set the poll delay

Example

let mut c = Receiver::<usize>::configure();
c.poll_delay(Some(Duration::new(0, 100_000)));

[src]

set receiver to continuous run mode aka service mode

Example

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

[src]

Build a new Receiver based on the current configuration

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

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