Improving robustness of stable bandwidth estimate test.

It didn't have proper time to stabilize, making it sensitive to small
changes. This CL increases the stabilization period from 20 to 30s.

Also fixing some minor test suite bug found during investigation.

Bug: webrtc:9718
Change-Id: If56dba5383251ad3d3efe304eebcd880522afabe
Reviewed-on: https://webrtc-review.googlesource.com/c/119943
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26408}
This commit is contained in:
Sebastian Jansson 2019-01-25 14:10:31 +01:00 committed by Commit Bot
parent bebca61e5e
commit 0ef117e14c
4 changed files with 6 additions and 4 deletions

View File

@ -574,7 +574,9 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback(
NetworkControlUpdate GoogCcNetworkController::GetNetworkState(
Timestamp at_time) const {
DataRate bandwidth = DataRate::bps(last_estimated_bitrate_bps_);
DataRate bandwidth = use_stable_bandwidth_estimate_
? bandwidth_estimation_->GetEstimatedLinkCapacity()
: last_raw_target_rate_;
TimeDelta rtt = TimeDelta::ms(last_estimated_rtt_ms_);
NetworkControlUpdate update;
update.target_rate = TargetTransferRate();

View File

@ -426,7 +426,7 @@ TEST_F(GoogCcNetworkControllerTest, StableEstimateDoesNotVaryInSteadyState) {
SimulatedTimeClient* client = s.CreateSimulatedTimeClient(
"send", config, {PacketStreamConfig()}, {send_net}, {ret_net});
// Run for a while to allow the estimate to stabilize.
s.RunFor(TimeDelta::seconds(20));
s.RunFor(TimeDelta::seconds(30));
DataRate min_estimate = DataRate::PlusInfinity();
DataRate max_estimate = DataRate::MinusInfinity();
// Measure variation in steady state.

View File

@ -33,7 +33,7 @@ bool GoogCcStatePrinter::Attached() const {
void GoogCcStatePrinter::PrintHeaders(RtcEventLogOutput* out) {
out->Write(
"rate_control_state rate_control_region alr_state"
"rate_control_state stable_estimate alr_state"
" trendline trendline_modified_offset trendline_offset_threshold");
}

View File

@ -371,7 +371,7 @@ void Scenario::RunUntil(TimeDelta max_duration,
sim_clock_.AdvanceTimeMicroseconds(wait_time.us());
// The fake clock is quite slow to update, we only update it if logging is
// turned on to save time.
if (!log_writer_factory_)
if (log_writer_factory_)
event_log_fake_clock_.SetTimeNanos(sim_clock_.TimeInMicroseconds() *
1000);
}