Trait mz_ore::metrics::DurationMetric

source ·
trait DurationMetric {
    // Required method
    fn record(&mut self, seconds: f64);
}
Available on crate feature metrics only.
Expand description

A trait makes recording a duration generic over different prometheus metrics. This allows us to de-dupe the implemenation of Future for our wrapper Futures like WallTimeFuture and ExecTimeFuture over different kinds of prometheus metrics.

Required Methods§

source

fn record(&mut self, seconds: f64)

Implementations on Foreign Types§

source§

impl DurationMetric for &mut f64

source§

fn record(&mut self, seconds: f64)

Implementors§