…as the TUI will disappear too quickly.
Unified · Split
| @@ -164,6 +164,7 @@ impl index::File { · 163 unmodified lines | |||
| 164 | 164 | ||
| 165 | struct Reducer<'a, P> { | 165 | struct Reducer<'a, P> { |
| 166 | progress: &'a std::sync::Mutex<P>, | 166 | progress: &'a std::sync::Mutex<P>, |
| 167 | then: Instant, | ||
| 167 | entries_seen: u32, | 168 | entries_seen: u32, |
| 168 | chunks_seen: usize, | 169 | chunks_seen: usize, |
| 169 | stats: PackFileChecksumResult, | 170 | stats: PackFileChecksumResult, |
| @@ -210,6 +211,13 @@ impl index::File { · 40 unmodified lines | |||
| 210 | fn finalize(mut self) -> Result<Self::Output, Self::Error> { | 211 | fn finalize(mut self) -> Result<Self::Output, Self::Error> { |
| 211 | self.progress.lock().unwrap().done("finished"); | 212 | self.progress.lock().unwrap().done("finished"); |
| 212 | div_decode_result(&mut self.stats.average, self.chunks_seen); | 213 | div_decode_result(&mut self.stats.average, self.chunks_seen); |
| 214 | let elapsed_s = Instant::now().duration_since(self.then).as_secs_f32(); | ||
| 215 | self.progress.lock().unwrap().info(format!( | ||
| 216 | "Reduced {} objects in {:.2}s ({:.0} objects/s)", | ||
| 217 | self.entries_seen, | ||
| 218 | elapsed_s, | ||
| 219 | self.entries_seen as f32 / elapsed_s | ||
| 220 | )); | ||
| 213 | Ok(self.stats) | 221 | Ok(self.stats) |
| 214 | } | 222 | } |
| 215 | } | 223 | } |
| @@ -312,6 +320,7 @@ impl index::File { · 96 unmodified lines | |||
| 312 | }, | 320 | }, |
| 313 | Reducer { | 321 | Reducer { |
| 314 | progress: &reduce_progress, | 322 | progress: &reduce_progress, |
| 323 | then: Instant::now(), | ||
| 315 | entries_seen: 0, | 324 | entries_seen: 0, |
| 316 | chunks_seen: 0, | 325 | chunks_seen: 0, |
| 317 | stats: PackFileChecksumResult { | 326 | stats: PackFileChecksumResult { |
| @@ -30,6 +30,7 @@ · 29 unmodified lines | |||
| 30 | * [x] statistics | 30 | * [x] statistics |
| 31 | * [ ] ~~a verbose mode to list each object in a pack, similar to existing git-verify-pack~~ | 31 | * [ ] ~~a verbose mode to list each object in a pack, similar to existing git-verify-pack~~ |
| 32 | * [x] journey tests | 32 | * [x] journey tests |
| 33 | * [x] display object throughput per second | ||
| 33 | * [ ] support for serde/miniserde for all returned data types (features per crate) | 34 | * [ ] support for serde/miniserde for all returned data types (features per crate) |
| 34 | * **stress** | 35 | * **stress** |
| 35 | * [ ] first stress test for validation of a big repository, linux maybe, or something smaller but big enough | 36 | * [ ] first stress test for validation of a big repository, linux maybe, or something smaller but big enough |