mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
ws: add prometheus peer client metrics
This commit is contained in:
parent
32aa34366c
commit
6675126d08
6 changed files with 95 additions and 1 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue