Method
update_stats
(
&self,
collected: usize,
uncollectable: usize,
candidates: usize,
duration: f64,
)
Source from the content-addressed store, hash-verified
| 105 | } |
| 106 | |
| 107 | pub fn update_stats( |
| 108 | &self, |
| 109 | collected: usize, |
| 110 | uncollectable: usize, |
| 111 | candidates: usize, |
| 112 | duration: f64, |
| 113 | ) { |
| 114 | let mut guard = self.stats.lock(); |
| 115 | guard.collections += 1; |
| 116 | guard.collected += collected; |
| 117 | guard.uncollectable += uncollectable; |
| 118 | guard.candidates += candidates; |
| 119 | guard.duration += duration; |
| 120 | } |
| 121 | |
| 122 | /// Reset the stats mutex to unlocked state after fork(). |
| 123 | /// |
Tested by
no test coverage detected