From 5a353856afbcb29ee357c4f2bda183a94d4f811d Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Mon, 15 Jan 2024 04:04:09 +0800 Subject: [PATCH] chore: log (#258) --- libs/client-api/src/http.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/client-api/src/http.rs b/libs/client-api/src/http.rs index b303e432..53553330 100644 --- a/libs/client-api/src/http.rs +++ b/libs/client-api/src/http.rs @@ -806,6 +806,7 @@ impl Client { .collect(); let mut framed_data = Vec::new(); + let mut size_count = 0; for task in compression_tasks { let compressed = task.await??; // The length of a u32 in bytes is 4. The server uses a u32 to read the size of each data frame, @@ -816,7 +817,13 @@ impl Client { let size = compressed.len() as u32; framed_data.extend_from_slice(&size.to_be_bytes()); framed_data.extend_from_slice(&compressed); + size_count += size; } + event!( + tracing::Level::INFO, + "create batch collab with size: {}", + size_count + ); let body = Body::wrap_stream(stream::once(async { Ok::<_, AppError>(framed_data) })); let resp = self .http_client_with_auth_compress(Method::POST, &url)