mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-18 02:36:24 +00:00
fix the quantic progress trace
This commit is contained in:
@ -88,11 +88,12 @@ impl Progress {
|
||||
}
|
||||
|
||||
pub fn accumulated_durations(&self) -> IndexMap<String, String> {
|
||||
let mut inner = self.steps.write().unwrap();
|
||||
let InnerProgress { steps, durations, .. } = &mut *inner;
|
||||
let inner = self.steps.read().unwrap();
|
||||
let InnerProgress { steps, durations, .. } = &*inner;
|
||||
let mut durations = durations.clone();
|
||||
|
||||
let now = Instant::now();
|
||||
push_steps_durations(steps, durations, now, 0);
|
||||
push_steps_durations(steps, &mut durations, now, 0);
|
||||
|
||||
durations.drain(..).map(|(name, duration)| (name, format!("{duration:.2?}"))).collect()
|
||||
}
|
||||
|
Reference in New Issue
Block a user