mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 19:16:17 +00:00
Centralize lifecycle state updates and fix systemd running status (#2567)
This commit is contained in:
@@ -170,11 +170,10 @@ impl MetricsSnapshot {
|
||||
}
|
||||
|
||||
pub fn avg_wait_time(&self) -> Duration {
|
||||
if self.slow_path_success == 0 {
|
||||
Duration::ZERO
|
||||
} else {
|
||||
Duration::from_nanos(self.total_wait_time_ns / self.slow_path_success)
|
||||
}
|
||||
self.total_wait_time_ns
|
||||
.checked_div(self.slow_path_success)
|
||||
.map(Duration::from_nanos)
|
||||
.unwrap_or(Duration::ZERO)
|
||||
}
|
||||
|
||||
pub fn max_wait_time(&self) -> Duration {
|
||||
|
||||
Reference in New Issue
Block a user