mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Separate transport settings for pacing tick and the pacing timer resolution
Summary: The pacingTimerTickInterval transport setting conflates two options: the minimum interval a pacer can use, and the resolution of the underlying timer. This means that a higher value leads to lower timer resolution and less pacing accuracy. This change adds a separate parameter for the timer resolution to ensure that a larger pacing tick does not degrade the pacer accuracy. Reviewed By: mjoras Differential Revision: D46564066 fbshipit-source-id: 0d0e54077b80da03e6e6c9baaab49a4c969966b6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
aa875db212
commit
931abc64af
@@ -3992,7 +3992,7 @@ TEST_F(QuicTransportTest, SetPacingTimerThenEnablesPacing) {
|
||||
TransportSettings transportSettings;
|
||||
transportSettings.pacingEnabled = true;
|
||||
transport_->setPacingTimer(
|
||||
TimerHighRes::newTimer(&evb_, transportSettings.pacingTimerTickInterval));
|
||||
TimerHighRes::newTimer(&evb_, transportSettings.pacingTimerResolution));
|
||||
transport_->setTransportSettings(transportSettings);
|
||||
transport_->getConnectionState().canBePaced = true;
|
||||
EXPECT_TRUE(isConnectionPaced(transport_->getConnectionState()));
|
||||
@@ -4881,7 +4881,7 @@ TEST_F(QuicTransportTest, SetMaxPacingRateWithAndWithoutPacing) {
|
||||
EXPECT_EQ(LocalErrorCode::PACER_NOT_AVAILABLE, res1.error());
|
||||
settings.pacingEnabled = true;
|
||||
transport_->setPacingTimer(
|
||||
TimerHighRes::newTimer(&evb_, settings.pacingTimerTickInterval));
|
||||
TimerHighRes::newTimer(&evb_, settings.pacingTimerResolution));
|
||||
transport_->setTransportSettings(settings);
|
||||
auto res2 = transport_->setMaxPacingRate(125000);
|
||||
EXPECT_FALSE(res2.hasError());
|
||||
|
Reference in New Issue
Block a user