diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 958311339d..845e81b6ab 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -1456,6 +1456,7 @@ impl Connection { }; if self.detect_spurious_loss(&ack, space) { + self.stats.path.spurious_congestion_events += 1; self.path.congestion.on_spurious_congestion_event(); } diff --git a/quinn-proto/src/connection/stats.rs b/quinn-proto/src/connection/stats.rs index f62e62ee6c..94779d0143 100644 --- a/quinn-proto/src/connection/stats.rs +++ b/quinn-proto/src/connection/stats.rs @@ -140,6 +140,8 @@ pub struct PathStats { pub cwnd: u64, /// Congestion events on the connection pub congestion_events: u64, + /// Spurious congestion events on the connection + pub spurious_congestion_events: u64, /// The amount of packets lost on this path pub lost_packets: u64, /// The amount of bytes lost on this path