diff --git a/streamer/src/nonblocking/stream_throttle.rs b/streamer/src/nonblocking/stream_throttle.rs index 8fda63271816e6..2a9f6382dd6596 100644 --- a/streamer/src/nonblocking/stream_throttle.rs +++ b/streamer/src/nonblocking/stream_throttle.rs @@ -11,8 +11,8 @@ use { }, }; -/// Limit to 250K PPS -const MAX_STREAMS_PER_MS: u64 = 250; +/// Limit to 25K PPS +const MAX_STREAMS_PER_MS: u64 = 25; const MAX_UNSTAKED_STREAMS_PERCENT: u64 = 20; const STREAM_THROTTLING_INTERVAL_MS: u64 = 100; pub const STREAM_STOP_CODE_THROTTLING: u32 = 15; @@ -243,13 +243,13 @@ pub mod test { Arc::new(StreamStats::default()), MAX_UNSTAKED_CONNECTIONS, )); - // 25K packets per ms * 20% / 500 max unstaked connections + // 2500 packets per 100 ms * 20% / 500 max unstaked connections assert_eq!( load_ema.available_load_capacity_in_throttling_duration( ConnectionPeerType::Unstaked, 10000, ), - 10 + 1 ); }