Struct tic::Sample [−][src]
pub struct Sample<T> { /* fields omitted */ }
a start and stop time for an event
Methods
impl<T: Hash + Eq + Send + Display + Clone> Sample<T>
[src]
impl<T: Hash + Eq + Send + Display + Clone> Sample<T>
pub fn new(start: u64, stop: u64, channel: T) -> Sample<T>
[src]
pub fn new(start: u64, stop: u64, channel: T) -> Sample<T>
Create a new Sample for a single event
pub fn counted(start: u64, stop: u64, count: u64, channel: T) -> Sample<T>
[src]
pub fn counted(start: u64, stop: u64, count: u64, channel: T) -> Sample<T>
Create a new Sample when multiple occurances of the event have happened
pub fn gauge(value: u64, channel: T) -> Sample<T>
[src]
pub fn gauge(value: u64, channel: T) -> Sample<T>
Create a new Sample of a point-in-time value
pub fn metric(&self) -> T
[src]
pub fn metric(&self) -> T
return the metric /// deprecated
pub fn channel(&self) -> T
[src]
pub fn channel(&self) -> T
return the metric
pub fn duration(&self) -> u64
[src]
pub fn duration(&self) -> u64
return the duration
pub fn start(&self) -> u64
[src]
pub fn start(&self) -> u64
return the start time
pub fn stop(&self) -> u64
[src]
pub fn stop(&self) -> u64
return the stop time
pub fn count(&self) -> u64
[src]
pub fn count(&self) -> u64
return the count of events
pub fn value(&self) -> u64
[src]
pub fn value(&self) -> u64
return the value