Function metrics_span

Source
pub fn metrics_span<R, F: FnOnce() -> R>(
    name: impl Into<Cow<'static, str>>,
    f: F,
) -> R
Expand description

A span that will run the given closure f, and emit a metric with the given name using gauge when the feature "bench-metrics" is enabled.