mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 18:55:32 +00:00
udp: prettier stdout statistics printing
This commit is contained in:
parent
f0e0a84088
commit
096fdeb93c
1 changed files with 7 additions and 7 deletions
|
|
@ -308,6 +308,10 @@ pub fn run_statistics_worker(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_to_stdout(config: &Config, statistics: &FormattedStatistics) {
|
fn print_to_stdout(config: &Config, statistics: &FormattedStatistics) {
|
||||||
|
println!(
|
||||||
|
" bandwidth: {:>7} Mbit/s in, {:7} Mbit/s out",
|
||||||
|
statistics.rx_mbits, statistics.tx_mbits,
|
||||||
|
);
|
||||||
println!(" requests/second: {:>10}", statistics.requests_per_second);
|
println!(" requests/second: {:>10}", statistics.requests_per_second);
|
||||||
println!(" responses/second");
|
println!(" responses/second");
|
||||||
println!(
|
println!(
|
||||||
|
|
@ -330,19 +334,15 @@ fn print_to_stdout(config: &Config, statistics: &FormattedStatistics) {
|
||||||
" error: {:>10}",
|
" error: {:>10}",
|
||||||
statistics.responses_per_second_error
|
statistics.responses_per_second_error
|
||||||
);
|
);
|
||||||
|
println!(" torrents: {:>10}", statistics.num_torrents);
|
||||||
println!(
|
println!(
|
||||||
" bandwidth: {:>7} Mbit/s in, {:7} Mbit/s out",
|
" peers: {:>10} (updated every {}s)",
|
||||||
statistics.rx_mbits, statistics.tx_mbits,
|
|
||||||
);
|
|
||||||
println!(" number of torrents: {}", statistics.num_torrents);
|
|
||||||
println!(
|
|
||||||
" number of peers: {} (updated every {} seconds)",
|
|
||||||
statistics.num_peers, config.cleaning.torrent_cleaning_interval
|
statistics.num_peers, config.cleaning.torrent_cleaning_interval
|
||||||
);
|
);
|
||||||
|
|
||||||
if config.statistics.extended {
|
if config.statistics.extended {
|
||||||
println!(
|
println!(
|
||||||
" peers per torrent (updated every {} seconds):",
|
" peers per torrent (updated every {}s)",
|
||||||
config.cleaning.torrent_cleaning_interval
|
config.cleaning.torrent_cleaning_interval
|
||||||
);
|
);
|
||||||
println!(" min {:>10}", statistics.peer_histogram.p0);
|
println!(" min {:>10}", statistics.peer_histogram.p0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue