From 6c7db3d9560f394a660d9d3c61e1b4aaef3b0d6e Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Sun, 20 Dec 2020 23:43:31 +0100 Subject: [PATCH] Display the time it took to process an update --- http-ui/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index 09064b2a4..27187acc0 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -322,6 +322,7 @@ async fn main() -> anyhow::Result<()> { 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()); + let before_update = Instant::now(); // we extract the update type and execute the update itself. let result: anyhow::Result<()> = match meta { UpdateMeta::DocumentsAddition { method, format, encoding } => { @@ -456,7 +457,7 @@ async fn main() -> anyhow::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), };