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.