ws: add prometheus peer client metrics

This commit is contained in:
Joakim Frostegård 2023-06-14 11:09:23 +02:00
parent 32aa34366c
commit 6675126d08
6 changed files with 95 additions and 1 deletions

View file

@ -156,6 +156,10 @@ pub struct MetricsConfig {
pub prometheus_endpoint_address: SocketAddr,
/// Update metrics for torrent count this often (seconds)
pub torrent_count_update_interval: u64,
/// Collect data on peer clients.
///
/// Expect a certain CPU hit
pub peer_clients: bool,
}
#[cfg(feature = "metrics")]
@ -165,6 +169,7 @@ impl Default for MetricsConfig {
run_prometheus_endpoint: false,
prometheus_endpoint_address: SocketAddr::from(([0, 0, 0, 0], 9000)),
torrent_count_update_interval: 10,
peer_clients: false,
}
}
}