Further reduce the CPU overhead of networking metrics (#10875)

* Simplify `num_connected_peers`

* Track requested peer counts

* Revert "Track requested peer counts"

This reverts commit 9f1c8704353df6afc17ed7e9f4ab8d8e29466ae4.

* Remove `substrate_sub_libp2p_peerset_num_requested` metric

* Remove two unused functions that I forgot to get rid of in previous commit
This commit is contained in:
Koute
2022-02-18 21:35:43 +09:00
committed by GitHub
parent 2777d4a154
commit b9a20ce86b
4 changed files with 1 additions and 37 deletions
@@ -69,7 +69,6 @@ pub struct Metrics {
pub notifications_streams_closed_total: CounterVec<U64>,
pub notifications_streams_opened_total: CounterVec<U64>,
pub peerset_num_discovered: Gauge<U64>,
pub peerset_num_requested: Gauge<U64>,
pub pending_connections: Gauge<U64>,
pub pending_connections_errors_total: CounterVec<U64>,
pub requests_in_failure_total: CounterVec<U64>,
@@ -204,10 +203,6 @@ impl Metrics {
"substrate_sub_libp2p_peerset_num_discovered",
"Number of nodes stored in the peerset manager",
)?, registry)?,
peerset_num_requested: prometheus::register(Gauge::new(
"substrate_sub_libp2p_peerset_num_requested",
"Number of nodes that the peerset manager wants us to be connected to",
)?, registry)?,
pending_connections: prometheus::register(Gauge::new(
"substrate_sub_libp2p_pending_connections",
"Number of connections in the process of being established",