From 9ffd697a88862cde59eaf67d2517571c547e4431 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 4 May 2023 08:03:17 +0200 Subject: [PATCH] Add killswitch for RTX receive stats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit guarding the change in receive stats behind the WebRTC-Stats-RtxReceiveStats field trial which acts as a killswitch. BUG=webrtc:15096 Change-Id: I475a2ce4fe4bddd454aa6477f8818384696c007b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304160 Reviewed-by: Henrik Boström Commit-Queue: Philipp Hancke Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#40005} --- video/video_receive_stream2.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index d4ca5e8eb7..6a9b000db4 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -568,7 +568,10 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { rtp_receive_statistics_->GetStatistician(rtx_ssrc()); if (rtx_statistician) { stats.total_bitrate_bps += rtx_statistician->BitrateReceived(); - stats.rtx_rtp_stats = rtx_statistician->GetStats(); + // TODO(bugs.webrtc.org/15096): remove kill-switch after rollout. + if (!call_->trials().IsDisabled("WebRTC-Stats-RtxReceiveStats")) { + stats.rtx_rtp_stats = rtx_statistician->GetStats(); + } } } return stats;