diff --git a/aquatic_udp/src/lib/common.rs b/aquatic_udp/src/lib/common.rs index c89b94f..d733c52 100644 --- a/aquatic_udp/src/lib/common.rs +++ b/aquatic_udp/src/lib/common.rs @@ -174,7 +174,6 @@ impl TorrentMaps { pub struct Statistics { pub requests_received: AtomicUsize, pub responses_sent: AtomicUsize, - pub readable_events: AtomicUsize, pub bytes_received: AtomicUsize, pub bytes_sent: AtomicUsize, } diff --git a/aquatic_udp/src/lib/network.rs b/aquatic_udp/src/lib/network.rs index b2403e2..da6bd2a 100644 --- a/aquatic_udp/src/lib/network.rs +++ b/aquatic_udp/src/lib/network.rs @@ -93,11 +93,6 @@ pub fn run_socket_worker( &request_sender, &mut local_responses, ); - - state - .statistics - .readable_events - .fetch_add(1, Ordering::SeqCst); } } diff --git a/aquatic_udp/src/lib/tasks.rs b/aquatic_udp/src/lib/tasks.rs index 54a0ce8..2665c45 100644 --- a/aquatic_udp/src/lib/tasks.rs +++ b/aquatic_udp/src/lib/tasks.rs @@ -41,19 +41,9 @@ pub fn gather_and_print_statistics(state: &State, config: &Config) { let bytes_received_per_second: f64 = bytes_received / interval as f64; let bytes_sent_per_second: f64 = bytes_sent / interval as f64; - let readable_events: f64 = state - .statistics - .readable_events - .fetch_and(0, Ordering::SeqCst) as f64; - let requests_per_readable_event = if readable_events == 0.0 { - 0.0 - } else { - requests_received / readable_events - }; - println!( - "stats: {:.2} requests/second, {:.2} responses/second, {:.2} requests/readable event", - requests_per_second, responses_per_second, requests_per_readable_event + "stats: {:.2} requests/second, {:.2} responses/second", + requests_per_second, responses_per_second ); println!(