mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-30 23:46:28 +00:00 
			
		
		
		
	Expose the call trace in the batch stats
This commit is contained in:
		| @@ -321,6 +321,7 @@ pub(crate) mod test { | ||||
|                 status: maplit::btreemap! { Status::Succeeded => 1 }, | ||||
|                 types: maplit::btreemap! { Kind::DocumentAdditionOrUpdate => 1 }, | ||||
|                 index_uids: maplit::btreemap! { "doggo".to_string() => 1 }, | ||||
|                 call_trace: Default::default(), | ||||
|             }, | ||||
|             enqueued_at: Some(BatchEnqueuedAt { | ||||
|                 earliest: datetime!(2022-11-11 0:00 UTC), | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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)] | ||||
|   | ||||
| @@ -14,6 +14,7 @@ license.workspace = true | ||||
| actix-web = { version = "4.9.0", default-features = false } | ||||
| anyhow = "1.0.95" | ||||
| bumpalo = "3.16.0" | ||||
| bumparaw-collections = "0.1.4" | ||||
| convert_case = "0.6.0" | ||||
| csv = "1.3.1" | ||||
| deserr = { version = "0.6.3", features = ["actix-web"] } | ||||
| @@ -24,12 +25,11 @@ flate2 = "1.0.35" | ||||
| fst = "0.4.7" | ||||
| memmap2 = "0.9.5" | ||||
| milli = { path = "../milli" } | ||||
| bumparaw-collections = "0.1.4" | ||||
| roaring = { version = "0.10.10", features = ["serde"] } | ||||
| rustc-hash = "2.1.0" | ||||
| serde = { version = "1.0.217", features = ["derive"] } | ||||
| serde-cs = "0.2.4" | ||||
| serde_json = "1.0.135" | ||||
| serde_json = { version = "1.0.135", features = ["preserve_order"] } | ||||
| tar = "0.4.43" | ||||
| tempfile = "3.15.0" | ||||
| thiserror = "2.0.9" | ||||
|   | ||||
| @@ -60,4 +60,5 @@ pub struct BatchStats { | ||||
|     pub status: BTreeMap<Status, u32>, | ||||
|     pub types: BTreeMap<Kind, u32>, | ||||
|     pub index_uids: BTreeMap<String, u32>, | ||||
|     pub call_trace: serde_json::Map<String, serde_json::Value>, | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user