Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: webrtc/call/rampup_tests.cc

Issue 2553613002: Revert "Revert of Use different restrictions of acked bitrate lag depending on operating point. (pa… (Closed)
Patch Set: Fix flaky tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/call/rampup_tests.h ('k') | webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/rampup_tests.cc
diff --git a/webrtc/call/rampup_tests.cc b/webrtc/call/rampup_tests.cc
index 61176b199fc007c2148bb95baa0da8c51e7078b6..eec3258773e75f927642c85846b883cbe75ed0a5 100644
--- a/webrtc/call/rampup_tests.cc
+++ b/webrtc/call/rampup_tests.cc
@@ -20,6 +20,11 @@ namespace webrtc {
namespace {
static const int64_t kPollIntervalMs = 20;
+static const int kHighBandwidthLimitBps = 80000;
+static const int kExpectedHighVideoBitrateBps = 60000;
+static const int kExpectedHighAudioBitrateBps = 30000;
+static const int kLowBandwidthLimitBps = 20000;
+static const int kExpectedLowBitrateBps = 20000;
std::vector<uint32_t> GenerateSsrcs(size_t num_streams, uint32_t ssrc_offset) {
std::vector<uint32_t> ssrcs;
@@ -414,12 +419,18 @@ std::string RampUpDownUpTester::GetModifierString() const {
return str;
}
+int RampUpDownUpTester::GetExpectedHighBitrate() const {
+ if (num_audio_streams_ > 0 && num_video_streams_ == 0)
+ return kExpectedHighAudioBitrateBps;
+ return kExpectedHighVideoBitrateBps;
+}
+
void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
int64_t now = clock_->TimeInMilliseconds();
switch (test_state_) {
case kFirstRampup: {
EXPECT_FALSE(suspended);
- if (bitrate_bps >= kExpectedHighBitrateBps) {
+ if (bitrate_bps >= GetExpectedHighBitrate()) {
// The first ramp-up has reached the target bitrate. Change the
// channel limit, and move to the next test state.
forward_transport_config_.link_capacity_kbps =
@@ -456,7 +467,7 @@ void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
break;
}
case kSecondRampup: {
- if (bitrate_bps >= kExpectedHighBitrateBps && !suspended) {
+ if (bitrate_bps >= GetExpectedHighBitrate() && !suspended) {
webrtc::test::PrintResult("ramp_up_down_up", GetModifierString(),
"second_rampup", now - state_start_ms_, "ms",
false);
« no previous file with comments | « webrtc/call/rampup_tests.h ('k') | webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698