From b26e74610d1c44e7c5cf1e2b58717f0eab0f947b Mon Sep 17 00:00:00 2001 From: ramiroaisen <52116153+ramiroaisen@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:24:34 -0300 Subject: [PATCH] feat: log stream end secs --- rs/packages/stream/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rs/packages/stream/src/lib.rs b/rs/packages/stream/src/lib.rs index a140ffc8..1a1b439c 100644 --- a/rs/packages/stream/src/lib.rs +++ b/rs/packages/stream/src/lib.rs @@ -641,9 +641,11 @@ impl Drop for StreamConnectionDropper { let duration_ms = start_time.elapsed().unwrap().as_millis() as u64; let now = DateTime::now(); + { + let s = duration_ms as f64 / 1_000.0; let end_reason = end_reason.lock(); - info!("END conn {id} {ip} - station: {station_id} ({station_name}) | reason={end_reason}"); + info!("END conn {id} {ip} - station: {station_id} ({station_name}) | reason={end_reason} - {s} s"); } tokio::spawn(async move {