mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
add release stat
This commit is contained in:
parent
f9f259e718
commit
373f2e5028
@ -46,6 +46,8 @@ pub struct ClientConnectorStats {
|
|||||||
pub errors: usize,
|
pub errors: usize,
|
||||||
/// Number of connection timeouts
|
/// Number of connection timeouts
|
||||||
pub timeouts: usize,
|
pub timeouts: usize,
|
||||||
|
/// Number of released connections
|
||||||
|
pub released: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@ -904,6 +906,7 @@ impl Handler<Connect> for ClientConnector {
|
|||||||
impl StreamHandler<AcquiredConnOperation, ()> for ClientConnector {
|
impl StreamHandler<AcquiredConnOperation, ()> for ClientConnector {
|
||||||
fn handle(&mut self, msg: AcquiredConnOperation, ctx: &mut Context<Self>) {
|
fn handle(&mut self, msg: AcquiredConnOperation, ctx: &mut Context<Self>) {
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
self.stats.released += 1;
|
||||||
|
|
||||||
// check if we have queued up waiters
|
// check if we have queued up waiters
|
||||||
let waiter = {
|
let waiter = {
|
||||||
|
Loading…
Reference in New Issue
Block a user