diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc index 9c82b70e78..226c4f0f7f 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -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(); diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc index 56600b3774..646e73f819 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc @@ -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. diff --git a/modules/congestion_controller/goog_cc/test/goog_cc_printer.cc b/modules/congestion_controller/goog_cc/test/goog_cc_printer.cc index c67f7e4623..aba3cec62c 100644 --- a/modules/congestion_controller/goog_cc/test/goog_cc_printer.cc +++ b/modules/congestion_controller/goog_cc/test/goog_cc_printer.cc @@ -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"); } diff --git a/test/scenario/scenario.cc b/test/scenario/scenario.cc index 49125a0d72..3bce243787 100644 --- a/test/scenario/scenario.cc +++ b/test/scenario/scenario.cc @@ -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); }