macro_rules! sample {
($sample_rate:expr, $($args:expr)+ ,) => { ... };
($sample_rate:expr, $($args:tt)+) => { ... };
}
Expand description
Samples a given function at a SampleRate
, useful for periodically emitting
logs or metrics on high throughput pieces of code.