Add some datapoints in quic for error conditions (#24489)

This commit is contained in:
Pankaj Garg 2022-04-19 13:05:02 -07:00 committed by GitHub
parent 705ea53353
commit 5d0dcca1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -307,6 +307,8 @@ struct StreamStats {
total_streams: AtomicUsize,
total_new_streams: AtomicUsize,
num_evictions: AtomicUsize,
connection_add_failed: AtomicUsize,
connection_setup_timeout: AtomicUsize,
}
impl StreamStats {
@ -338,6 +340,16 @@ impl StreamStats {
self.num_evictions.swap(0, Ordering::Relaxed),
i64
),
(
"connection_add_failed",
self.connection_add_failed.load(Ordering::Relaxed),
i64
),
(
"connection_setup_timeout",
self.connection_setup_timeout.load(Ordering::Relaxed),
i64
),
);
}
}
@ -487,7 +499,13 @@ pub fn spawn_server(
stream_exit,
stats,
);
} else {
stats.connection_add_failed.fetch_add(1, Ordering::Relaxed);
}
} else {
stats
.connection_setup_timeout
.fetch_add(1, Ordering::Relaxed);
}
}
}