mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-10 15:08:56 +01:00
Display the time it took to process an update
This commit is contained in:
parent
9fcbc83ebc
commit
6c7db3d956
@ -322,6 +322,7 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
update_builder.chunk_compression_type(indexer_opt_cloned.chunk_compression_type);
|
update_builder.chunk_compression_type(indexer_opt_cloned.chunk_compression_type);
|
||||||
update_builder.chunk_fusing_shrink_size(indexer_opt_cloned.chunk_fusing_shrink_size.get_bytes());
|
update_builder.chunk_fusing_shrink_size(indexer_opt_cloned.chunk_fusing_shrink_size.get_bytes());
|
||||||
|
|
||||||
|
let before_update = Instant::now();
|
||||||
// we extract the update type and execute the update itself.
|
// we extract the update type and execute the update itself.
|
||||||
let result: anyhow::Result<()> = match meta {
|
let result: anyhow::Result<()> = match meta {
|
||||||
UpdateMeta::DocumentsAddition { method, format, encoding } => {
|
UpdateMeta::DocumentsAddition { method, format, encoding } => {
|
||||||
@ -456,7 +457,7 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let meta = match result {
|
let meta = match result {
|
||||||
Ok(()) => format!("valid update content"),
|
Ok(()) => format!("valid update content processed in {:.02?}", before_update.elapsed()),
|
||||||
Err(e) => format!("error while processing update content: {:?}", e),
|
Err(e) => format!("error while processing update content: {:?}", e),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user