From f390deb0859307850961758cdf8a295d7647f613 Mon Sep 17 00:00:00 2001 From: lz1998 <875543533@qq.com> Date: Tue, 21 Jun 2022 13:18:09 +0800 Subject: [PATCH] update --- src/msg/from_proto.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/msg/from_proto.rs b/src/msg/from_proto.rs index 81ba233..ad39adf 100644 --- a/src/msg/from_proto.rs +++ b/src/msg/from_proto.rs @@ -90,10 +90,23 @@ pub async fn append_image( contact: Contact, ) -> RCResult<()> { let url = data.remove("url").unwrap_or_default(); + let uin = client.uin().await; + let start = std::time::Instant::now(); + let r: u32 = rand::random(); + if uin == 2490390725 { + tracing::info!("download_binary {} start", r) + } let data = get_binary(&url).await?; + tracing::info!("download_binary {} end {:?}", r, start.elapsed()); + let start = std::time::Instant::now(); + let r: u32 = rand::random(); + if uin == 2490390725 { + tracing::info!("upload_image {} start", r) + } match contact { Contact::Group(code) => chain.push(client.upload_group_image(code, data).await?), Contact::Friend(uin) => chain.push(client.upload_friend_image(uin, data).await?), } + tracing::info!("upload_image {} end {:?}", r, start.elapsed()); Ok(()) }