Use default probe duration if target higher than networkstate estimate
Use default probe duration and probe delta if probe target higher than network state estimate. Bug: webrtc:42224658, b/379234056 Change-Id: I1e6283681d005111fce5fc90e468b1ce2ce4b81f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368620 Commit-Queue: Per Kjellander <perkj@webrtc.org> Reviewed-by: Diep Bui <diepbp@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43423}
This commit is contained in:
parent
999f02bd5f
commit
8337c966d4
@ -106,6 +106,8 @@ ProbeControllerConfig::ProbeControllerConfig(
|
||||
network_state_probe_scale("network_state_scale", 1.0),
|
||||
network_state_probe_duration("network_state_probe_duration",
|
||||
TimeDelta::Millis(15)),
|
||||
network_state_min_probe_delta("network_state_min_probe_delta",
|
||||
TimeDelta::Millis(20)),
|
||||
probe_on_max_allocated_bitrate_change("probe_max_allocation", true),
|
||||
first_allocation_probe_scale("alloc_p1", 1),
|
||||
second_allocation_probe_scale("alloc_p2", 2),
|
||||
@ -135,6 +137,7 @@ ProbeControllerConfig::ProbeControllerConfig(
|
||||
&min_probe_delta,
|
||||
&initial_min_probe_delta,
|
||||
&network_state_estimate_probing_interval,
|
||||
&network_state_min_probe_delta,
|
||||
&probe_if_estimate_lower_than_network_state_estimate_ratio,
|
||||
&estimate_lower_than_network_state_estimate_probing_interval,
|
||||
&network_state_probe_scale,
|
||||
@ -529,9 +532,11 @@ ProbeClusterConfig ProbeController::CreateProbeClusterConfig(Timestamp at_time,
|
||||
config.at_time = at_time;
|
||||
config.target_data_rate = bitrate;
|
||||
if (network_estimate_ &&
|
||||
config_.network_state_estimate_probing_interval->IsFinite()) {
|
||||
config_.network_state_estimate_probing_interval->IsFinite() &&
|
||||
network_estimate_->link_capacity_upper.IsFinite() &&
|
||||
network_estimate_->link_capacity_upper >= bitrate) {
|
||||
config.target_duration = config_.network_state_probe_duration;
|
||||
config.min_probe_delta = config_.min_probe_delta;
|
||||
config.min_probe_delta = config_.network_state_min_probe_delta;
|
||||
} else if (at_time < last_allowed_repeated_initial_probe_) {
|
||||
config.target_duration = config_.initial_probe_duration;
|
||||
config.min_probe_delta = config_.initial_min_probe_delta;
|
||||
|
||||
@ -65,8 +65,13 @@ struct ProbeControllerConfig {
|
||||
estimate_lower_than_network_state_estimate_probing_interval;
|
||||
FieldTrialParameter<double> network_state_probe_scale;
|
||||
// Overrides min_probe_duration if network_state_estimate_probing_interval
|
||||
// is set and a network state estimate is known.
|
||||
// is set and a network state estimate is known and equal or higher than the
|
||||
// probe target.
|
||||
FieldTrialParameter<TimeDelta> network_state_probe_duration;
|
||||
// Overrides min_probe_delta if network_state_estimate_probing_interval
|
||||
// is set and a network state estimate is known and equal or higher than the
|
||||
// probe target.
|
||||
FieldTrialParameter<TimeDelta> network_state_min_probe_delta;
|
||||
|
||||
// Configures the probes emitted by changed to the allocated bitrate.
|
||||
FieldTrialParameter<bool> probe_on_max_allocated_bitrate_change;
|
||||
|
||||
@ -1393,7 +1393,8 @@ TEST(ProbeControllerTest, SendsProbeIfNetworkStateEstimateLowerThanMaxProbe) {
|
||||
ProbeControllerFixture fixture(
|
||||
"WebRTC-Bwe-ProbingConfiguration/"
|
||||
"network_state_interval:2s,skip_if_est_larger_than_fraction_of_max:0.9,"
|
||||
"/");
|
||||
"network_state_probe_duration:100ms,network_"
|
||||
"state_min_probe_delta:20/");
|
||||
std::unique_ptr<ProbeController> probe_controller =
|
||||
fixture.CreateController();
|
||||
ASSERT_THAT(
|
||||
@ -1420,13 +1421,19 @@ TEST(ProbeControllerTest, SendsProbeIfNetworkStateEstimateLowerThanMaxProbe) {
|
||||
{.link_capacity_upper = 2 * kStartBitrate});
|
||||
probes = probe_controller->Process(fixture.CurrentTime());
|
||||
EXPECT_FALSE(probes.empty());
|
||||
EXPECT_LE(probes[0].target_data_rate, 2 * kStartBitrate);
|
||||
// Expect probe durations to be picked from field trial probe target is lower
|
||||
// or equal to the network state estimate.
|
||||
EXPECT_EQ(probes[0].min_probe_delta, TimeDelta::Millis(20));
|
||||
EXPECT_EQ(probes[0].target_duration, TimeDelta::Millis(100));
|
||||
}
|
||||
|
||||
TEST(ProbeControllerTest,
|
||||
ProbeNotLimitedByNetworkStateEsimateIfLowerThantCurrent) {
|
||||
ProbeControllerFixture fixture(
|
||||
"WebRTC-Bwe-ProbingConfiguration/"
|
||||
"network_state_interval:5s/");
|
||||
"network_state_interval:5s,network_state_probe_duration:100ms,network_"
|
||||
"state_min_probe_delta:20/");
|
||||
std::unique_ptr<ProbeController> probe_controller =
|
||||
fixture.CreateController();
|
||||
ASSERT_THAT(
|
||||
@ -1452,6 +1459,10 @@ TEST(ProbeControllerTest,
|
||||
probes = probe_controller->Process(fixture.CurrentTime());
|
||||
ASSERT_FALSE(probes.empty());
|
||||
EXPECT_EQ(probes[0].target_data_rate, kStartBitrate);
|
||||
// Expect probe durations to be default since network state estimate is lower
|
||||
// than the probe rate.
|
||||
EXPECT_EQ(probes[0].min_probe_delta, TimeDelta::Millis(2));
|
||||
EXPECT_EQ(probes[0].target_duration, TimeDelta::Millis(15));
|
||||
}
|
||||
|
||||
TEST(ProbeControllerTest, DontProbeIfDelayIncreased) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user