From 72d88dd4e9b6c68c3f03c08b9847bde3d22025c8 Mon Sep 17 00:00:00 2001 From: Mariusz Reichert Date: Tue, 19 Mar 2024 17:28:10 +0100 Subject: [PATCH] Start time update --- src/electrum/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/electrum/server.rs b/src/electrum/server.rs index e03dc1350..811cf0138 100644 --- a/src/electrum/server.rs +++ b/src/electrum/server.rs @@ -527,6 +527,7 @@ impl Connection { let empty_params = json!([]); loop { let msg = self.chan.receiver().recv().chain_err(|| "channel closed")?; + let start_time = Instant::now(); trace!("RPC {:?}", msg); match msg { Message::Request(line) => { @@ -555,7 +556,6 @@ impl Connection { }) ); - let start_time = Instant::now(); let reply = self.handle_command(method, params, id)?; conditionally_log_rpc_event!( @@ -564,7 +564,7 @@ impl Connection { "event": "rpc response", "method": method, "payload_size": reply.to_string().as_bytes().len(), - "duration_µs": start_time.elapsed().as_micros(), + "duration_micros": start_time.elapsed().as_micros(), "id": id, }) );