mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 16:59:52 +00:00
@@ -101,10 +101,11 @@ impl LockedLastMinuteLatency {
|
||||
{
|
||||
let old = self.cached.clone();
|
||||
self.cached = AccElem::default();
|
||||
let mut a = AccElem::default();
|
||||
a.size = old.size;
|
||||
a.total = old.total;
|
||||
a.n = old.n;
|
||||
let a = AccElem {
|
||||
size: old.size,
|
||||
total: old.total,
|
||||
n: old.n,
|
||||
};
|
||||
let _ = self.mu.write().await;
|
||||
self.latency.add_all(t - 1, &a);
|
||||
}
|
||||
@@ -130,6 +131,12 @@ pub struct ScannerMetrics {
|
||||
current_paths: HashMap<String, String>,
|
||||
}
|
||||
|
||||
impl Default for ScannerMetrics {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl ScannerMetrics {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
|
||||
Reference in New Issue
Block a user