udp: add optional peers per torrent statistics

This commit is contained in:
Joakim Frostegård 2022-08-06 13:56:19 +02:00
parent c0ed0eb7db
commit f0e0a84088
9 changed files with 251 additions and 17 deletions

View file

@ -142,6 +142,8 @@ impl Default for ProtocolConfig {
pub struct StatisticsConfig {
/// Collect and print/write statistics this often (seconds)
pub interval: u64,
/// Enable extended statistics (on peers per torrent)
pub extended: bool,
/// Print statistics to standard output
pub print_to_stdout: bool,
/// Save statistics as HTML to a file
@ -160,6 +162,7 @@ impl Default for StatisticsConfig {
fn default() -> Self {
Self {
interval: 5,
extended: false,
print_to_stdout: false,
write_html_to_file: false,
html_file_path: "tmp/statistics.html".into(),