Make "WebRTC-BweAllocProbingOnlyInAlr/Enabled/" default and remove key.

Bug: chromium:951299
Change-Id: Idf612040e21f2962cc63d7de3dcb237bbf868034
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148985
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Konrad Hofbauer <hofbauer@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28902}
This commit is contained in:
Konrad Hofbauer
2019-08-19 13:50:57 +02:00
committed by Commit Bot
parent e3a10e1b43
commit fdf38802a6
5 changed files with 23 additions and 17 deletions

View File

@ -118,7 +118,7 @@ void UpdatesTargetRateBasedOnLinkCapacity(std::string test_name = "") {
truth->PrintRow();
s.RunFor(TimeDelta::seconds(50));
truth->PrintRow();
EXPECT_NEAR(client->target_rate().kbps(), 90, 20);
EXPECT_NEAR(client->target_rate().kbps(), 90, 25);
}
} // namespace

View File

@ -73,10 +73,6 @@ constexpr char kBweRapidRecoveryExperiment[] =
// Never probe higher than configured by OnMaxTotalAllocatedBitrate().
constexpr char kCappedProbingFieldTrialName[] = "WebRTC-BweCappedProbing";
// Only do allocation probing when in ALR (but not when network-limited).
constexpr char kAllocProbingOnlyInAlrFieldTrialName[] =
"WebRTC-BweAllocProbingOnlyInAlr";
void MaybeLogProbeClusterCreated(RtcEventLog* event_log,
const ProbeClusterConfig& probe) {
RTC_DCHECK(event_log);
@ -138,9 +134,6 @@ ProbeController::ProbeController(const WebRtcKeyValueConfig* key_value_config,
limit_probes_with_allocateable_rate_(
key_value_config->Lookup(kCappedProbingFieldTrialName)
.find("Disabled") != 0),
allocation_probing_only_in_alr_(
key_value_config->Lookup(kAllocProbingOnlyInAlrFieldTrialName)
.find("Enabled") == 0),
event_log_(event_log),
config_(ProbeControllerConfig(key_value_config)) {
Reset(0);
@ -202,8 +195,7 @@ std::vector<ProbeClusterConfig> ProbeController::OnMaxTotalAllocatedBitrate(
int64_t max_total_allocated_bitrate,
int64_t at_time_ms) {
const bool in_alr = alr_start_time_ms_.has_value();
const bool allow_allocation_probe =
allocation_probing_only_in_alr_ ? in_alr : true;
const bool allow_allocation_probe = in_alr;
if (state_ == State::kProbingComplete &&
max_total_allocated_bitrate != max_total_allocated_bitrate_ &&

View File

@ -132,7 +132,6 @@ class ProbeController {
const bool in_rapid_recovery_experiment_;
const bool limit_probes_with_allocateable_rate_;
const bool allocation_probing_only_in_alr_;
// For WebRTC.BWE.MidCallProbing.* metric.
bool mid_call_probing_waiting_for_result_;
int64_t mid_call_probing_bitrate_bps_;

View File

@ -97,7 +97,6 @@ TEST_F(ProbeControllerTest, InitiatesProbingOnMaxBitrateIncrease) {
}
TEST_F(ProbeControllerTest, ProbesOnMaxBitrateIncreaseOnlyWhenInAlr) {
test::ScopedFieldTrials trials("WebRTC-BweAllocProbingOnlyInAlr/Enabled/");
probe_controller_.reset(
new ProbeController(&field_trial_config_, &mock_rtc_event_log));
auto probes = probe_controller_->SetBitrates(kMinBitrateBps, kStartBitrateBps,
@ -364,6 +363,7 @@ TEST_F(ProbeControllerTest, ConfigurableProbingFieldTrial) {
clock_.AdvanceTimeMilliseconds(5000);
probes = probe_controller_->Process(NowMs());
probe_controller_->SetAlrStartTimeMs(NowMs());
probes = probe_controller_->OnMaxTotalAllocatedBitrate(200000, NowMs());
EXPECT_EQ(probes.size(), 1u);
EXPECT_EQ(probes[0].target_data_rate.bps(), 400000);

View File

@ -234,6 +234,7 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) {
void PerformTest() override {
*success_ = false;
int64_t start_time_ms = clock_->TimeInMilliseconds();
int64_t max_allocation_change_time_ms = -1;
do {
if (clock_->TimeInMilliseconds() - start_time_ms > kTimeoutMs)
break;
@ -264,22 +265,34 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) {
}
break;
case 1:
if (stats.send_bandwidth_bps <= 210000) {
if (stats.send_bandwidth_bps <= 200000) {
// Initial probing finished. Increase link capacity and wait
// until BWE ramped up enough to be in ALR. This takes a few
// seconds.
BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 5000;
send_simulated_network_->SetConfig(config);
++state_;
}
break;
case 2:
if (stats.send_bandwidth_bps > 240000) {
// BWE ramped up enough to be in ALR. Setting higher max_bitrate
// should trigger an allocation probe and fast ramp-up.
encoder_config_->max_bitrate_bps = 2000000;
encoder_config_->simulcast_layers[0].max_bitrate_bps = 1200000;
task_queue_->SendTask([this]() {
send_stream_->ReconfigureVideoEncoder(encoder_config_->Copy());
});
max_allocation_change_time_ms = clock_->TimeInMilliseconds();
++state_;
}
break;
case 2:
case 3:
if (stats.send_bandwidth_bps >= 1000000) {
EXPECT_LT(
clock_->TimeInMilliseconds() - max_allocation_change_time_ms,
kRampUpMaxDurationMs);
*success_ = true;
observation_complete_.Set();
}
@ -289,7 +302,9 @@ TEST_F(ProbingEndToEndTest, ProbeOnVideoEncoderReconfiguration) {
}
private:
const int kTimeoutMs = 3000;
const int kTimeoutMs = 10000;
const int kRampUpMaxDurationMs = 500;
test::SingleThreadedTaskQueueForTesting* const task_queue_;
bool* const success_;
SimulatedNetwork* send_simulated_network_;