diff --git a/examples/tester-client/src/main.rs b/examples/tester-client/src/main.rs index 9ec02e5..9ef1730 100644 --- a/examples/tester-client/src/main.rs +++ b/examples/tester-client/src/main.rs @@ -428,23 +428,23 @@ pub async fn main() { transaction_notifications_stats.add_value(&transaction_notifications); block_notifications_stats.add_value(&block_notifications); - println!("------------------------------------------"); - println!( + log::info!("------------------------------------------"); + log::info!( " DateTime : {:?}", instant.duration_since(start_instance).as_secs() ); - println!(" Bytes Transfered : {} Mbs/s", bytes_transfered / 1_000_000); - println!( + log::info!(" Bytes Transfered : {} Mbs/s", bytes_transfered / 1_000_000); + log::info!( " Accounts transfered size (uncompressed) : {} Mbs", total_accounts_size / 1_000_000 ); - println!(" Accounts Notified : {}", account_notification); - println!(" Slots Notified : {}", slot_notifications); - println!(" Blockmeta notified : {}", blockmeta_notifications); - println!(" Transactions notified : {}", transaction_notifications); - println!(" Blocks notified : {}", block_notifications); + log::info!(" Accounts Notified : {}", account_notification); + log::info!(" Slots Notified : {}", slot_notifications); + log::info!(" Blockmeta notified : {}", blockmeta_notifications); + log::info!(" Transactions notified : {}", transaction_notifications); + log::info!(" Blocks notified : {}", block_notifications); - println!(" Cluster Slots: {}, Account Slot: {}, Slot Notification slot: {}, BlockMeta slot: {}, Block slot: {}", cluster_slot.load(std::sync::atomic::Ordering::Relaxed), account_slot.load(std::sync::atomic::Ordering::Relaxed), slot_slot.load(std::sync::atomic::Ordering::Relaxed), blockmeta_slot.load(std::sync::atomic::Ordering::Relaxed), block_slot.load(std::sync::atomic::Ordering::Relaxed)); + log::info!(" Cluster Slots: {}, Account Slot: {}, Slot Notification slot: {}, BlockMeta slot: {}, Block slot: {}", cluster_slot.load(std::sync::atomic::Ordering::Relaxed), account_slot.load(std::sync::atomic::Ordering::Relaxed), slot_slot.load(std::sync::atomic::Ordering::Relaxed), blockmeta_slot.load(std::sync::atomic::Ordering::Relaxed), block_slot.load(std::sync::atomic::Ordering::Relaxed)); if counter % 10 == 0 { println!("------------------STATS------------------------"); diff --git a/server/src/quiche_server_loop.rs b/server/src/quiche_server_loop.rs index 3b6dc93..e065ed1 100644 --- a/server/src/quiche_server_loop.rs +++ b/server/src/quiche_server_loop.rs @@ -346,6 +346,7 @@ fn create_client_task( let mut continue_write = false; loop { + log::debug!("start"); number_of_loops.fetch_add(1, std::sync::atomic::Ordering::Relaxed); let mut timeout = if continue_write { Duration::from_secs(0) @@ -361,6 +362,7 @@ fn create_client_task( match internal_message { InternalMessage::Packet(info, mut buf) => { + log::debug!("packet"); // handle packet from udp socket let buf = buf.as_mut_slice(); match connection.recv(buf, info) { @@ -375,6 +377,7 @@ fn create_client_task( }; } InternalMessage::ClientMessage(message, priority) => { + log::debug!("client"); // handle message from client let stream_id = next_stream; next_stream = @@ -425,6 +428,7 @@ fn create_client_task( } } } + log::debug!("readble"); if !did_read && !continue_write { connection.on_timeout(); } @@ -455,7 +459,7 @@ fn create_client_task( } } } - + log::debug!("writable"); if !connection.is_closed() && (connection.is_established() || connection.is_in_early_data()) { @@ -478,6 +482,7 @@ fn create_client_task( } if instance.elapsed() > Duration::from_secs(1) { + log::debug!("other tasks"); instance = Instant::now(); handle_path_events(&mut connection); @@ -508,6 +513,7 @@ fn create_client_task( datagram_size }; + log::debug!("creating packets"); while total_length < max_burst_size { match connection.send(&mut out[total_length..max_burst_size]) { Ok((len, send_info)) => { @@ -539,6 +545,7 @@ fn create_client_task( } if total_length > 0 && send_message_to.is_some() { + log::debug!("sending :{total_length:?}"); continue_write = true; let send_result = if enable_pacing { send_with_pacing( @@ -552,7 +559,9 @@ fn create_client_task( socket.send(&out[..total_length]) }; match send_result { - Ok(_written) => {} + Ok(_written) => { + log::debug!("finished sending"); + } Err(e) => { log::error!("sending failed with error : {e:?}"); }