fix tests (#588)

fix proxy_three_node_disconnect_test and hole_punching_symmetric_only_random
This commit is contained in:
Sijie.Sun
2025-01-27 15:17:47 +08:00
committed by GitHub
parent d0f26d9303
commit 08546925cc
6 changed files with 110 additions and 66 deletions
+11 -1
View File
@@ -9,6 +9,16 @@ pub struct WindowLatency {
count: AtomicU32,
}
impl std::fmt::Debug for WindowLatency {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("WindowLatency")
.field("count", &self.count)
.field("window_size", &self.latency_us_window_size)
.field("window_latency", &self.get_latency_us::<u32>())
.finish()
}
}
impl WindowLatency {
pub fn new(window_size: u32) -> Self {
Self {
@@ -48,7 +58,7 @@ impl WindowLatency {
}
}
#[derive(Default, Copy, Clone)]
#[derive(Default, Copy, Clone, Debug)]
pub struct Throughput {
tx_bytes: u64,
rx_bytes: u64,