Expose the call trace in the batch stats

This commit is contained in:
Kerollmops 2025-02-19 11:24:11 +01:00
parent e9add14189
commit 3ff1de0a21
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
6 changed files with 10 additions and 6 deletions

View file

@ -29,7 +29,7 @@ page_size = "0.6.0"
rayon = "1.10.0"
roaring = { version = "0.10.10", features = ["serde"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = { version = "1.0.135", features = ["preserve_order"] }
serde_json = { version = "1.0.138", features = ["preserve_order"] }
synchronoise = "1.0.1"
tempfile = "3.15.0"
thiserror = "2.0.9"

View file

@ -339,7 +339,9 @@ impl IndexScheduler {
// We must re-add the canceled task so they're part of the same batch.
ids |= canceled;
eprintln!("{:#?}", progress.accumulated_durations());
let durations = progress.accumulated_durations();
processing_batch.stats.call_trace =
durations.into_iter().map(|(k, v)| (k, v.into())).collect();
self.queue.write_batch(&mut wtxn, processing_batch, &ids)?;
#[cfg(test)]