mirror of
https://github.com/actix/actix-web.git
synced 2024-11-27 12:01:15 +00:00
add release stat
This commit is contained in:
parent
f9f259e718
commit
373f2e5028
1 changed files with 3 additions and 0 deletions
|
@ -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<Connect> for ClientConnector {
|
|||
impl StreamHandler<AcquiredConnOperation, ()> for ClientConnector {
|
||||
fn handle(&mut self, msg: AcquiredConnOperation, ctx: &mut Context<Self>) {
|
||||
let now = Instant::now();
|
||||
self.stats.released += 1;
|
||||
|
||||
// check if we have queued up waiters
|
||||
let waiter = {
|
||||
|
|
Loading…
Reference in a new issue