Throttle 'Very high pacing rate' log message

By producing new message only when new max is 10% larger than the previous max.

Bug: b/305042040
Change-Id: Id85784939f944de8115b881471b02214c34b3043
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323841
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40950}
This commit is contained in:
Danil Chapovalov 2023-10-17 13:01:43 +02:00 committed by WebRTC LUCI CQ
parent 7c612c3074
commit c2994790a1
2 changed files with 4 additions and 4 deletions

View file

@ -164,7 +164,6 @@ void PacingController::SetProbingEnabled(bool enabled) {
void PacingController::SetPacingRates(DataRate pacing_rate,
DataRate padding_rate) {
static constexpr DataRate kMaxRate = DataRate::KilobitsPerSec(100'000);
RTC_CHECK_GT(pacing_rate, DataRate::Zero());
RTC_CHECK_GE(padding_rate, DataRate::Zero());
if (padding_rate > pacing_rate) {
@ -174,11 +173,12 @@ void PacingController::SetPacingRates(DataRate pacing_rate,
padding_rate = pacing_rate;
}
if (pacing_rate > kMaxRate || padding_rate > kMaxRate) {
RTC_LOG(LS_WARNING) << "Very high pacing rates ( > " << kMaxRate.kbps()
if (pacing_rate > max_rate || padding_rate > max_rate) {
RTC_LOG(LS_WARNING) << "Very high pacing rates ( > " << max_rate.kbps()
<< " kbps) configured: pacing = " << pacing_rate.kbps()
<< " kbps, padding = " << padding_rate.kbps()
<< " kbps.";
max_rate = std::max(pacing_rate, padding_rate) * 1.1;
}
pacing_rate_ = pacing_rate;
padding_rate_ = padding_rate;

View file

@ -214,7 +214,7 @@ class PacingController {
const bool ignore_transport_overhead_;
const bool fast_retransmissions_;
const bool keyframe_flushing_;
DataRate max_rate = DataRate::BitsPerSec(100'000'000);
DataSize transport_overhead_per_packet_;
TimeDelta send_burst_interval_;