Struct tic::Config
[−]
[src]
pub struct Config<T> { pub duration: usize, pub windows: 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
duration: usize
windows: usize
http_listen: Option<String>
trace_file: Option<String>
waterfall_file: Option<String>
heatmap_config: Config
histogram_config: Config
Methods
impl<T: Hash + Eq + Send + Display + Clone> Config<T>
[src]
fn new() -> Config<T>
fn duration(self, duration: usize) -> Self
set integration window in seconds: default 60
Example
let mut c = Receiver::<usize>::configure(); c.duration(60); // set to 60 second integration window
fn windows(self, windows: usize) -> Self
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
fn http_listen(self, address: String) -> Self
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
fn trace_file(self, path: String) -> Self
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
fn waterfall_file(self, path: String) -> Self
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
fn build(self) -> Receiver<T>
Build a new Receiver based on the current configuration
Trait Implementations
impl<T: Clone> Clone for Config<T>
[src]
fn clone(&self) -> Config<T>
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