Remove unused field trial WebRTC-SendBufferSizeBytes

Bug: webrtc:9637
Change-Id: Ie4bf5caa3977f1824f6dc1014b1feacf6ebfe670
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269386
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37617}
This commit is contained in:
Erik Språng 2022-07-25 15:43:20 +02:00 committed by WebRTC LUCI CQ
parent 7494da36e5
commit 5793ed8ff9
2 changed files with 3 additions and 77 deletions

View File

@ -1892,23 +1892,8 @@ void WebRtcVideoChannel::SetInterface(NetworkInterface* iface) {
RTC_DCHECK_RUN_ON(&network_thread_checker_);
MediaChannel::SetInterface(iface);
// Set the RTP recv/send buffer to a bigger size.
// The group should be a positive integer with an explicit size, in
// which case that is used as UDP recevie buffer size. All other values shall
// result in the default value being used.
const std::string group_name_recv_buf_size =
call_->trials().Lookup("WebRTC-IncreasedReceivebuffers");
int recv_buffer_size = kVideoRtpRecvBufferSize;
if (!group_name_recv_buf_size.empty() &&
(sscanf(group_name_recv_buf_size.c_str(), "%d", &recv_buffer_size) != 1 ||
recv_buffer_size <= 0)) {
RTC_LOG(LS_WARNING) << "Invalid receive buffer size: "
<< group_name_recv_buf_size;
recv_buffer_size = kVideoRtpRecvBufferSize;
}
MediaChannel::SetOption(NetworkInterface::ST_RTP, rtc::Socket::OPT_RCVBUF,
recv_buffer_size);
kVideoRtpRecvBufferSize);
// Speculative change to increase the outbound socket buffer size.
// In b/15152257, we are seeing a significant number of packets discarded

View File

@ -1808,69 +1808,10 @@ TEST_F(WebRtcVideoChannelBaseTest, SetSendWithoutCodecs) {
TEST_F(WebRtcVideoChannelBaseTest, SetSendSetsTransportBufferSizes) {
EXPECT_TRUE(SetOneCodec(DefaultCodec()));
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(64 * 1024, network_interface_.sendbuf_size());
EXPECT_EQ(256 * 1024, network_interface_.recvbuf_size());
EXPECT_EQ(kVideoRtpSendBufferSize, network_interface_.sendbuf_size());
EXPECT_EQ(kVideoRtpRecvBufferSize, network_interface_.recvbuf_size());
}
// Test that we properly set the send and recv buffer sizes when overriding
// via field trials.
TEST_F(WebRtcVideoChannelBaseTest, OverridesRecvBufferSize) {
// Set field trial to override the default recv buffer size, and then re-run
// setup where the interface is created and configured.
const int kCustomRecvBufferSize = 123456;
override_field_trials_ = std::make_unique<webrtc::test::ScopedKeyValueConfig>(
field_trials_, "WebRTC-IncreasedReceivebuffers/123456/");
ResetTest();
EXPECT_TRUE(SetOneCodec(DefaultCodec()));
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(64 * 1024, network_interface_.sendbuf_size());
EXPECT_EQ(kCustomRecvBufferSize, network_interface_.recvbuf_size());
}
// Test that we properly set the send and recv buffer sizes when overriding
// via field trials with suffix.
TEST_F(WebRtcVideoChannelBaseTest, OverridesRecvBufferSizeWithSuffix) {
// Set field trial to override the default recv buffer size, and then re-run
// setup where the interface is created and configured.
const int kCustomRecvBufferSize = 123456;
override_field_trials_ = std::make_unique<webrtc::test::ScopedKeyValueConfig>(
field_trials_, "WebRTC-IncreasedReceivebuffers/123456_Dogfood/");
ResetTest();
EXPECT_TRUE(SetOneCodec(DefaultCodec()));
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(64 * 1024, network_interface_.sendbuf_size());
EXPECT_EQ(kCustomRecvBufferSize, network_interface_.recvbuf_size());
}
class InvalidRecvBufferSizeFieldTrial
: public WebRtcVideoChannelBaseTest,
public ::testing::WithParamInterface<const char*> {};
// Test that we properly set the send and recv buffer sizes when overriding
// via field trials that don't make any sense.
TEST_P(InvalidRecvBufferSizeFieldTrial, InvalidRecvBufferSize) {
// Set bogus field trial values to override the default recv buffer size, and
// then re-run setup where the interface is created and configured. The
// default value should still be used.
override_field_trials_ = std::make_unique<webrtc::test::ScopedKeyValueConfig>(
field_trials_,
std::string("WebRTC-IncreasedReceivebuffers/") + GetParam() + "/");
ResetTest();
EXPECT_TRUE(SetOneCodec(DefaultCodec()));
EXPECT_TRUE(SetSend(true));
EXPECT_EQ(64 * 1024, network_interface_.sendbuf_size());
EXPECT_EQ(256 * 1024, network_interface_.recvbuf_size());
}
INSTANTIATE_TEST_SUITE_P(All,
InvalidRecvBufferSizeFieldTrial,
Values("NotANumber", "-1", " ", "0"));
// Test that stats work properly for a 1-1 call.
TEST_F(WebRtcVideoChannelBaseTest, GetStats) {
const int kDurationSec = 3;