Enum diem_logger::sample::SampleRate
source · pub enum SampleRate {
Duration(Duration),
Frequency(u64),
Always,
}
Expand description
The rate at which a sample!
macro will run it’s given function
Variants§
Duration(Duration)
Only sample a single time during a window of time. This rate only has a resolution in seconds.
Frequency(u64)
Sample based on the frequency of the event. The provided u64 is the inverse of the frequency (1/x), for example Frequency(2) means that 1 out of every 2 events will be sampled (1/2).
Always
Always Sample
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SampleRate
impl Send for SampleRate
impl Sync for SampleRate
impl Unpin for SampleRate
impl UnwindSafe for SampleRate
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more