From 373f2e5028f547dd5aea80d3e99cc54a75272def Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 17 Jul 2018 17:38:16 +0600 Subject: [PATCH] add release stat --- src/client/connector.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/connector.rs b/src/client/connector.rs index 5d66d66d6..b97cfc711 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -46,6 +46,8 @@ pub struct ClientConnectorStats { pub errors: usize, /// Number of connection timeouts pub timeouts: usize, + /// Number of released connections + pub released: usize, } #[derive(Debug)] @@ -904,6 +906,7 @@ impl Handler for ClientConnector { impl StreamHandler for ClientConnector { fn handle(&mut self, msg: AcquiredConnOperation, ctx: &mut Context) { let now = Instant::now(); + self.stats.released += 1; // check if we have queued up waiters let waiter = {