mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
ws: support serving metrics on peer id prefixes
This commit is contained in:
parent
6675126d08
commit
0204b6fcc2
2 changed files with 42 additions and 9 deletions
|
|
@ -156,10 +156,16 @@ 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.
|
||||
/// Serve information on peer clients
|
||||
///
|
||||
/// Expect a certain CPU hit
|
||||
pub peer_clients: bool,
|
||||
/// Serve information on all peer id prefixes
|
||||
///
|
||||
/// Requires `peer_clients` to be activated.
|
||||
///
|
||||
/// Expect a certain CPU hit
|
||||
pub peer_id_prefixes: bool,
|
||||
}
|
||||
|
||||
#[cfg(feature = "metrics")]
|
||||
|
|
@ -170,6 +176,7 @@ impl Default for MetricsConfig {
|
|||
prometheus_endpoint_address: SocketAddr::from(([0, 0, 0, 0], 9000)),
|
||||
torrent_count_update_interval: 10,
|
||||
peer_clients: false,
|
||||
peer_id_prefixes: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue