mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-21 23:51:00 +00:00
switch from micros to millis
This commit is contained in:
parent
1685d83c04
commit
2d439c388c
1 changed files with 3 additions and 4 deletions
|
@ -32,7 +32,7 @@ impl MetricDbProxy {
|
||||||
op_duration: meter
|
op_duration: meter
|
||||||
.f64_value_recorder("db.op_duration")
|
.f64_value_recorder("db.op_duration")
|
||||||
.with_description("Duration of operations on the local metadata engine")
|
.with_description("Duration of operations on the local metadata engine")
|
||||||
.with_unit(Unit::new("us"))
|
.with_unit(Unit::new("ms"))
|
||||||
.init(),
|
.init(),
|
||||||
};
|
};
|
||||||
Db(Arc::new(s))
|
Db(Arc::new(s))
|
||||||
|
@ -57,9 +57,8 @@ impl MetricDbProxy {
|
||||||
let delay_nanos = Instant::now()
|
let delay_nanos = Instant::now()
|
||||||
.saturating_duration_since(request_start)
|
.saturating_duration_since(request_start)
|
||||||
.as_nanos();
|
.as_nanos();
|
||||||
let delay_micro: f64 = delay_nanos as f64 / 1000.0f64;
|
let delay_millis: f64 = delay_nanos as f64 / 1_000_000f64;
|
||||||
println!("delay {}", delay_micro);
|
self.op_duration.record(delay_millis, &metric_tags);
|
||||||
self.op_duration.record(delay_micro, &metric_tags);
|
|
||||||
|
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue