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