Remove field trial string WebRTC-AdaptiveBweThreshold and cleanup
Removed old disabled tests enable test on android Bug: webrtc:4711 Change-Id: Ic9adbdadc9e847bdf31b8be4ce116a3695499944 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284922 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Per Kjellander <perkj@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38736}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
158d5e3078
commit
bc43fe3a50
@ -86,7 +86,6 @@ AimdRateControl::AimdRateControl(const FieldTrialsView* key_value_config,
|
|||||||
in_alr_(false),
|
in_alr_(false),
|
||||||
rtt_(kDefaultRtt),
|
rtt_(kDefaultRtt),
|
||||||
send_side_(send_side),
|
send_side_(send_side),
|
||||||
in_experiment_(!AdaptiveThresholdExperimentIsDisabled(*key_value_config)),
|
|
||||||
no_bitrate_increase_in_alr_(
|
no_bitrate_increase_in_alr_(
|
||||||
IsEnabled(*key_value_config,
|
IsEnabled(*key_value_config,
|
||||||
"WebRTC-DontIncreaseDelayBasedBweInAlr")),
|
"WebRTC-DontIncreaseDelayBasedBweInAlr")),
|
||||||
@ -233,7 +232,7 @@ double AimdRateControl::GetNearMaxIncreaseRateBpsPerSecond() const {
|
|||||||
|
|
||||||
// Approximate the over-use estimator delay to 100 ms.
|
// Approximate the over-use estimator delay to 100 ms.
|
||||||
TimeDelta response_time = rtt_ + TimeDelta::Millis(100);
|
TimeDelta response_time = rtt_ + TimeDelta::Millis(100);
|
||||||
if (in_experiment_)
|
|
||||||
response_time = response_time * 2;
|
response_time = response_time * 2;
|
||||||
double increase_rate_bps_per_second =
|
double increase_rate_bps_per_second =
|
||||||
(avg_packet_size / response_time).bps<double>();
|
(avg_packet_size / response_time).bps<double>();
|
||||||
|
|||||||
@ -100,7 +100,6 @@ class AimdRateControl {
|
|||||||
bool in_alr_;
|
bool in_alr_;
|
||||||
TimeDelta rtt_;
|
TimeDelta rtt_;
|
||||||
const bool send_side_;
|
const bool send_side_;
|
||||||
const bool in_experiment_;
|
|
||||||
// Allow the delay based estimate to only increase as long as application
|
// Allow the delay based estimate to only increase as long as application
|
||||||
// limited region (alr) is not detected.
|
// limited region (alr) is not detected.
|
||||||
const bool no_bitrate_increase_in_alr_;
|
const bool no_bitrate_increase_in_alr_;
|
||||||
|
|||||||
@ -22,57 +22,22 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
const char kAdaptiveThresholdExperiment[] = "WebRTC-AdaptiveBweThreshold";
|
|
||||||
const char kEnabledPrefix[] = "Enabled";
|
|
||||||
const size_t kEnabledPrefixLength = sizeof(kEnabledPrefix) - 1;
|
|
||||||
const char kDisabledPrefix[] = "Disabled";
|
|
||||||
const size_t kDisabledPrefixLength = sizeof(kDisabledPrefix) - 1;
|
|
||||||
|
|
||||||
const double kMaxAdaptOffsetMs = 15.0;
|
const double kMaxAdaptOffsetMs = 15.0;
|
||||||
const double kOverUsingTimeThreshold = 10;
|
const double kOverUsingTimeThreshold = 10;
|
||||||
const int kMaxNumDeltas = 60;
|
const int kMaxNumDeltas = 60;
|
||||||
|
|
||||||
bool AdaptiveThresholdExperimentIsDisabled(
|
|
||||||
const FieldTrialsView& key_value_config) {
|
|
||||||
std::string experiment_string =
|
|
||||||
key_value_config.Lookup(kAdaptiveThresholdExperiment);
|
|
||||||
const size_t kMinExperimentLength = kDisabledPrefixLength;
|
|
||||||
if (experiment_string.length() < kMinExperimentLength)
|
|
||||||
return false;
|
|
||||||
return experiment_string.substr(0, kDisabledPrefixLength) == kDisabledPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gets thresholds from the experiment name following the format
|
|
||||||
// "WebRTC-AdaptiveBweThreshold/Enabled-0.5,0.002/".
|
|
||||||
bool ReadExperimentConstants(const FieldTrialsView& key_value_config,
|
|
||||||
double* k_up,
|
|
||||||
double* k_down) {
|
|
||||||
std::string experiment_string =
|
|
||||||
key_value_config.Lookup(kAdaptiveThresholdExperiment);
|
|
||||||
const size_t kMinExperimentLength = kEnabledPrefixLength + 3;
|
|
||||||
if (experiment_string.length() < kMinExperimentLength ||
|
|
||||||
experiment_string.substr(0, kEnabledPrefixLength) != kEnabledPrefix)
|
|
||||||
return false;
|
|
||||||
return sscanf(experiment_string.substr(kEnabledPrefixLength + 1).c_str(),
|
|
||||||
"%lf,%lf", k_up, k_down) == 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
OveruseDetector::OveruseDetector(const FieldTrialsView* key_value_config)
|
OveruseDetector::OveruseDetector(const FieldTrialsView* key_value_config)
|
||||||
// Experiment is on by default, but can be disabled with finch by setting
|
// Experiment is on by default, but can be disabled with finch by setting
|
||||||
// the field trial string to "WebRTC-AdaptiveBweThreshold/Disabled/".
|
// the field trial string to "WebRTC-AdaptiveBweThreshold/Disabled/".
|
||||||
: in_experiment_(!AdaptiveThresholdExperimentIsDisabled(*key_value_config)),
|
: k_up_(0.0087),
|
||||||
k_up_(0.0087),
|
|
||||||
k_down_(0.039),
|
k_down_(0.039),
|
||||||
overusing_time_threshold_(100),
|
overusing_time_threshold_(kOverUsingTimeThreshold),
|
||||||
threshold_(12.5),
|
threshold_(12.5),
|
||||||
last_update_ms_(-1),
|
last_update_ms_(-1),
|
||||||
prev_offset_(0.0),
|
prev_offset_(0.0),
|
||||||
time_over_using_(-1),
|
time_over_using_(-1),
|
||||||
overuse_counter_(0),
|
overuse_counter_(0),
|
||||||
hypothesis_(BandwidthUsage::kBwNormal) {
|
hypothesis_(BandwidthUsage::kBwNormal) {}
|
||||||
if (!AdaptiveThresholdExperimentIsDisabled(*key_value_config))
|
|
||||||
InitializeExperiment(*key_value_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
OveruseDetector::~OveruseDetector() {}
|
OveruseDetector::~OveruseDetector() {}
|
||||||
|
|
||||||
@ -125,9 +90,6 @@ BandwidthUsage OveruseDetector::Detect(double offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) {
|
void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) {
|
||||||
if (!in_experiment_)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (last_update_ms_ == -1)
|
if (last_update_ms_ == -1)
|
||||||
last_update_ms_ = now_ms;
|
last_update_ms_ = now_ms;
|
||||||
|
|
||||||
@ -146,15 +108,4 @@ void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) {
|
|||||||
last_update_ms_ = now_ms;
|
last_update_ms_ = now_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OveruseDetector::InitializeExperiment(
|
|
||||||
const FieldTrialsView& key_value_config) {
|
|
||||||
RTC_DCHECK(in_experiment_);
|
|
||||||
double k_up = 0.0;
|
|
||||||
double k_down = 0.0;
|
|
||||||
overusing_time_threshold_ = kOverUsingTimeThreshold;
|
|
||||||
if (ReadExperimentConstants(key_value_config, &k_up, &k_down)) {
|
|
||||||
k_up_ = k_up;
|
|
||||||
k_down_ = k_down;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|||||||
@ -17,9 +17,6 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
bool AdaptiveThresholdExperimentIsDisabled(
|
|
||||||
const FieldTrialsView& key_value_config);
|
|
||||||
|
|
||||||
class OveruseDetector {
|
class OveruseDetector {
|
||||||
public:
|
public:
|
||||||
explicit OveruseDetector(const FieldTrialsView* key_value_config);
|
explicit OveruseDetector(const FieldTrialsView* key_value_config);
|
||||||
@ -46,10 +43,9 @@ class OveruseDetector {
|
|||||||
void UpdateThreshold(double modified_offset, int64_t now_ms);
|
void UpdateThreshold(double modified_offset, int64_t now_ms);
|
||||||
void InitializeExperiment(const FieldTrialsView& key_value_config);
|
void InitializeExperiment(const FieldTrialsView& key_value_config);
|
||||||
|
|
||||||
bool in_experiment_;
|
const double k_up_;
|
||||||
double k_up_;
|
const double k_down_;
|
||||||
double k_down_;
|
const double overusing_time_threshold_;
|
||||||
double overusing_time_threshold_;
|
|
||||||
double threshold_;
|
double threshold_;
|
||||||
int64_t last_update_ms_;
|
int64_t last_update_ms_;
|
||||||
double prev_offset_;
|
double prev_offset_;
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
#include "modules/remote_bitrate_estimator/inter_arrival.h"
|
#include "modules/remote_bitrate_estimator/inter_arrival.h"
|
||||||
#include "modules/remote_bitrate_estimator/overuse_estimator.h"
|
#include "modules/remote_bitrate_estimator/overuse_estimator.h"
|
||||||
#include "rtc_base/random.h"
|
#include "rtc_base/random.h"
|
||||||
#include "test/field_trial.h"
|
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
@ -218,69 +217,6 @@ TEST_F(OveruseDetectorTest, SimpleOveruse100kbit10fps) {
|
|||||||
EXPECT_EQ(7, frames_until_overuse);
|
EXPECT_EQ(7, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(OveruseDetectorTest, DISABLED_OveruseWithHighVariance100Kbit10fps) {
|
|
||||||
uint32_t frame_duration_ms = 100;
|
|
||||||
uint32_t drift_per_frame_ms = 10;
|
|
||||||
uint32_t rtp_timestamp = frame_duration_ms * 90;
|
|
||||||
size_t packet_size = 1200;
|
|
||||||
int offset = 10;
|
|
||||||
|
|
||||||
// Run 1000 samples to reach steady state.
|
|
||||||
for (int i = 0; i < 1000; ++i) {
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
rtp_timestamp += frame_duration_ms * 90;
|
|
||||||
if (i % 2) {
|
|
||||||
offset = random_.Rand(0, 49);
|
|
||||||
now_ms_ += frame_duration_ms - offset;
|
|
||||||
} else {
|
|
||||||
now_ms_ += frame_duration_ms + offset;
|
|
||||||
}
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwNormal, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
// Simulate a higher send pace, that is too high.
|
|
||||||
// Above noise generate a standard deviation of approximately 28 ms.
|
|
||||||
// Total build up of 150 ms.
|
|
||||||
for (int j = 0; j < 15; ++j) {
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
now_ms_ += frame_duration_ms + drift_per_frame_ms;
|
|
||||||
rtp_timestamp += frame_duration_ms * 90;
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwNormal, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwOverusing, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(OveruseDetectorTest, DISABLED_OveruseWithLowVariance100Kbit10fps) {
|
|
||||||
uint32_t frame_duration_ms = 100;
|
|
||||||
uint32_t drift_per_frame_ms = 1;
|
|
||||||
uint32_t rtp_timestamp = frame_duration_ms * 90;
|
|
||||||
size_t packet_size = 1200;
|
|
||||||
int offset = 10;
|
|
||||||
|
|
||||||
// Run 1000 samples to reach steady state.
|
|
||||||
for (int i = 0; i < 1000; ++i) {
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
rtp_timestamp += frame_duration_ms * 90;
|
|
||||||
if (i % 2) {
|
|
||||||
offset = random_.Rand(0, 1);
|
|
||||||
now_ms_ += frame_duration_ms - offset;
|
|
||||||
} else {
|
|
||||||
now_ms_ += frame_duration_ms + offset;
|
|
||||||
}
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwNormal, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
// Simulate a higher send pace, that is too high.
|
|
||||||
// Total build up of 6 ms.
|
|
||||||
for (int j = 0; j < 6; ++j) {
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
now_ms_ += frame_duration_ms + drift_per_frame_ms;
|
|
||||||
rtp_timestamp += frame_duration_ms * 90;
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwNormal, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
UpdateDetector(rtp_timestamp, now_ms_, packet_size);
|
|
||||||
EXPECT_EQ(BandwidthUsage::kBwOverusing, overuse_detector_->State());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(OveruseDetectorTest, OveruseWithLowVariance2000Kbit30fps) {
|
TEST_F(OveruseDetectorTest, OveruseWithLowVariance2000Kbit30fps) {
|
||||||
uint32_t frame_duration_ms = 33;
|
uint32_t frame_duration_ms = 33;
|
||||||
uint32_t drift_per_frame_ms = 1;
|
uint32_t drift_per_frame_ms = 1;
|
||||||
@ -322,13 +258,7 @@ TEST_F(OveruseDetectorTest, OveruseWithLowVariance2000Kbit30fps) {
|
|||||||
EXPECT_EQ(BandwidthUsage::kBwOverusing, overuse_detector_->State());
|
EXPECT_EQ(BandwidthUsage::kBwOverusing, overuse_detector_->State());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance30Kbit3fps) {
|
||||||
#define MAYBE_LowGaussianVariance30Kbit3fps \
|
|
||||||
DISABLED_LowGaussianVariance30Kbit3fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance30Kbit3fps LowGaussianVariance30Kbit3fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance30Kbit3fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 1;
|
int packets_per_frame = 1;
|
||||||
int frame_duration_ms = 333;
|
int frame_duration_ms = 333;
|
||||||
@ -388,13 +318,7 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift30Kbit3fps) {
|
|||||||
EXPECT_EQ(4, frames_until_overuse);
|
EXPECT_EQ(4, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance100Kbit5fps) {
|
||||||
#define MAYBE_LowGaussianVariance100Kbit5fps \
|
|
||||||
DISABLED_LowGaussianVariance100Kbit5fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance100Kbit5fps LowGaussianVariance100Kbit5fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit5fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 2;
|
int packets_per_frame = 2;
|
||||||
int frame_duration_ms = 200;
|
int frame_duration_ms = 200;
|
||||||
@ -409,13 +333,7 @@ TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit5fps) {
|
|||||||
EXPECT_EQ(20, frames_until_overuse);
|
EXPECT_EQ(20, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, HighGaussianVariance100Kbit5fps) {
|
||||||
#define MAYBE_HighGaussianVariance100Kbit5fps \
|
|
||||||
DISABLED_HighGaussianVariance100Kbit5fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_HighGaussianVariance100Kbit5fps HighGaussianVariance100Kbit5fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit5fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 2;
|
int packets_per_frame = 2;
|
||||||
int frame_duration_ms = 200;
|
int frame_duration_ms = 200;
|
||||||
@ -430,13 +348,7 @@ TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit5fps) {
|
|||||||
EXPECT_EQ(44, frames_until_overuse);
|
EXPECT_EQ(44, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance100Kbit10fps) {
|
||||||
#define MAYBE_LowGaussianVariance100Kbit10fps \
|
|
||||||
DISABLED_LowGaussianVariance100Kbit10fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance100Kbit10fps LowGaussianVariance100Kbit10fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit10fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 1;
|
int packets_per_frame = 1;
|
||||||
int frame_duration_ms = 100;
|
int frame_duration_ms = 100;
|
||||||
@ -451,13 +363,7 @@ TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance100Kbit10fps) {
|
|||||||
EXPECT_EQ(20, frames_until_overuse);
|
EXPECT_EQ(20, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, HighGaussianVariance100Kbit10fps) {
|
||||||
#define MAYBE_HighGaussianVariance100Kbit10fps \
|
|
||||||
DISABLED_HighGaussianVariance100Kbit10fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_HighGaussianVariance100Kbit10fps HighGaussianVariance100Kbit10fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit10fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 1;
|
int packets_per_frame = 1;
|
||||||
int frame_duration_ms = 100;
|
int frame_duration_ms = 100;
|
||||||
@ -472,13 +378,7 @@ TEST_F(OveruseDetectorTest, MAYBE_HighGaussianVariance100Kbit10fps) {
|
|||||||
EXPECT_EQ(44, frames_until_overuse);
|
EXPECT_EQ(44, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance300Kbit30fps) {
|
||||||
#define MAYBE_LowGaussianVariance300Kbit30fps \
|
|
||||||
DISABLED_LowGaussianVariance300Kbit30fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance300Kbit30fps LowGaussianVariance300Kbit30fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance300Kbit30fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 1;
|
int packets_per_frame = 1;
|
||||||
int frame_duration_ms = 33;
|
int frame_duration_ms = 33;
|
||||||
@ -538,13 +438,7 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift300Kbit30fps) {
|
|||||||
EXPECT_EQ(10, frames_until_overuse);
|
EXPECT_EQ(10, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance1000Kbit30fps) {
|
||||||
#define MAYBE_LowGaussianVariance1000Kbit30fps \
|
|
||||||
DISABLED_LowGaussianVariance1000Kbit30fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance1000Kbit30fps LowGaussianVariance1000Kbit30fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance1000Kbit30fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 3;
|
int packets_per_frame = 3;
|
||||||
int frame_duration_ms = 33;
|
int frame_duration_ms = 33;
|
||||||
@ -604,13 +498,7 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift1000Kbit30fps) {
|
|||||||
EXPECT_EQ(10, frames_until_overuse);
|
EXPECT_EQ(10, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WEBRTC_ANDROID)
|
TEST_F(OveruseDetectorTest, LowGaussianVariance2000Kbit30fps) {
|
||||||
#define MAYBE_LowGaussianVariance2000Kbit30fps \
|
|
||||||
DISABLED_LowGaussianVariance2000Kbit30fps
|
|
||||||
#else
|
|
||||||
#define MAYBE_LowGaussianVariance2000Kbit30fps LowGaussianVariance2000Kbit30fps
|
|
||||||
#endif
|
|
||||||
TEST_F(OveruseDetectorTest, MAYBE_LowGaussianVariance2000Kbit30fps) {
|
|
||||||
size_t packet_size = 1200;
|
size_t packet_size = 1200;
|
||||||
int packets_per_frame = 6;
|
int packets_per_frame = 6;
|
||||||
int frame_duration_ms = 33;
|
int frame_duration_ms = 33;
|
||||||
@ -670,22 +558,7 @@ TEST_F(OveruseDetectorTest, HighGaussianVarianceFastDrift2000Kbit30fps) {
|
|||||||
EXPECT_EQ(10, frames_until_overuse);
|
EXPECT_EQ(10, frames_until_overuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
class OveruseDetectorExperimentTest : public OveruseDetectorTest {
|
TEST_F(OveruseDetectorTest, ThresholdAdapts) {
|
||||||
public:
|
|
||||||
OveruseDetectorExperimentTest()
|
|
||||||
: override_field_trials_(
|
|
||||||
"WebRTC-AdaptiveBweThreshold/Enabled-0.01,0.00018/") {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void SetUp() override {
|
|
||||||
overuse_detector_.reset(new OveruseDetector(&field_trials_));
|
|
||||||
}
|
|
||||||
|
|
||||||
test::ScopedFieldTrials override_field_trials_;
|
|
||||||
const FieldTrialBasedConfig field_trials_;
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_F(OveruseDetectorExperimentTest, ThresholdAdapts) {
|
|
||||||
const double kOffset = 0.21;
|
const double kOffset = 0.21;
|
||||||
double kTsDelta = 3000.0;
|
double kTsDelta = 3000.0;
|
||||||
int64_t now_ms = 0;
|
int64_t now_ms = 0;
|
||||||
@ -756,7 +629,7 @@ TEST_F(OveruseDetectorExperimentTest, ThresholdAdapts) {
|
|||||||
EXPECT_TRUE(overuse_detected);
|
EXPECT_TRUE(overuse_detected);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(OveruseDetectorExperimentTest, DoesntAdaptToSpikes) {
|
TEST_F(OveruseDetectorTest, DoesntAdaptToSpikes) {
|
||||||
const double kOffset = 1.0;
|
const double kOffset = 1.0;
|
||||||
const double kLargeOffset = 20.0;
|
const double kLargeOffset = 20.0;
|
||||||
double kTsDelta = 3000.0;
|
double kTsDelta = 3000.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user