Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 | 40 |
| 41 Random random_; | 41 Random random_; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 RTC_DISALLOW_COPY_AND_ASSIGN(BweSimulation); | 44 RTC_DISALLOW_COPY_AND_ASSIGN(BweSimulation); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 INSTANTIATE_TEST_CASE_P(VideoSendersTest, | 47 INSTANTIATE_TEST_CASE_P(VideoSendersTest, |
| 48 BweSimulation, | 48 BweSimulation, |
| 49 ::testing::Values(kRembEstimator, | 49 ::testing::Values(kRembEstimator, |
| 50 kFullSendSideEstimator, | 50 kAbsSendTimeEstimator, |
|
stefan-webrtc
2016/10/19 16:35:19
If you are ok with it I think we can simply remove
terelius
2016/10/24 12:54:23
Done.
| |
| 51 kNadaEstimator)); | 51 kNadaEstimator, |
| 52 kSendSideEstimator)); | |
| 52 | 53 |
| 53 TEST_P(BweSimulation, SprintUplinkTest) { | 54 TEST_P(BweSimulation, SprintUplinkTest) { |
| 54 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 55 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
| 55 VideoSender sender(&uplink_, &source, GetParam()); | 56 VideoSender sender(&uplink_, &source, GetParam()); |
| 56 RateCounterFilter counter1(&uplink_, 0, "sender_output", | 57 RateCounterFilter counter1(&uplink_, 0, "sender_output", |
| 57 bwe_names[GetParam()]); | 58 bwe_names[GetParam()]); |
| 58 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); | 59 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); |
| 59 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); | 60 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); |
| 60 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); | 61 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); |
| 61 ASSERT_TRUE(filter.Init(test::ResourcePath("sprint-uplink", "rx"))); | 62 ASSERT_TRUE(filter.Init(test::ResourcePath("sprint-uplink", "rx"))); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; | 326 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; |
| 326 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 500, 50, 0, offset_ms); | 327 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 500, 50, 0, offset_ms); |
| 327 } | 328 } |
| 328 | 329 |
| 329 TEST_P(BweSimulation, TcpFairness1000msTest) { | 330 TEST_P(BweSimulation, TcpFairness1000msTest) { |
| 330 const int kAverageOffsetMs = 20 * 1000; | 331 const int kAverageOffsetMs = 20 * 1000; |
| 331 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; | 332 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; |
| 332 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 1000, 50, 0, offset_ms); | 333 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 1000, 50, 0, offset_ms); |
| 333 } | 334 } |
| 334 | 335 |
| 335 // The following test cases begin with "Evaluation" as a referrence to the | 336 // The following test cases begin with "Evaluation" as a referrence to the |
|
brandtr
2016/10/20 08:00:31
"reference"
terelius
2016/10/24 12:54:23
Done.
| |
| 336 // Internet draft https://tools.ietf.org/html/draft-ietf-rmcat-eval-test-01. | 337 // Internet draft https://tools.ietf.org/html/draft-ietf-rmcat-eval-test-01. |
| 337 | 338 |
| 338 TEST_P(BweSimulation, Evaluation1) { | 339 TEST_P(BweSimulation, Evaluation1) { |
| 339 RunVariableCapacity1SingleFlow(GetParam()); | 340 RunVariableCapacity1SingleFlow(GetParam()); |
| 340 } | 341 } |
| 341 | 342 |
| 342 TEST_P(BweSimulation, Evaluation2) { | 343 TEST_P(BweSimulation, Evaluation2) { |
| 343 const size_t kNumFlows = 2; | 344 const size_t kNumFlows = 2; |
| 344 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); | 345 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); |
| 345 } | 346 } |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 373 TEST_P(BweSimulation, Evaluation8) { | 374 TEST_P(BweSimulation, Evaluation8) { |
| 374 RunPauseResumeFlows(GetParam()); | 375 RunPauseResumeFlows(GetParam()); |
| 375 } | 376 } |
| 376 | 377 |
| 377 // Following test cases begin with "GccComparison" run the | 378 // Following test cases begin with "GccComparison" run the |
| 378 // evaluation test cases for both GCC and other calling RMCAT. | 379 // evaluation test cases for both GCC and other calling RMCAT. |
| 379 | 380 |
| 380 TEST_P(BweSimulation, GccComparison1) { | 381 TEST_P(BweSimulation, GccComparison1) { |
| 381 RunVariableCapacity1SingleFlow(GetParam()); | 382 RunVariableCapacity1SingleFlow(GetParam()); |
| 382 BweTest gcc_test(false); | 383 BweTest gcc_test(false); |
| 383 gcc_test.RunVariableCapacity1SingleFlow(kFullSendSideEstimator); | 384 gcc_test.RunVariableCapacity1SingleFlow(kSendSideEstimator); |
| 384 } | 385 } |
| 385 | 386 |
| 386 TEST_P(BweSimulation, GccComparison2) { | 387 TEST_P(BweSimulation, GccComparison2) { |
| 387 const size_t kNumFlows = 2; | 388 const size_t kNumFlows = 2; |
| 388 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); | 389 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); |
| 389 BweTest gcc_test(false); | 390 BweTest gcc_test(false); |
| 390 gcc_test.RunVariableCapacity2MultipleFlows(kFullSendSideEstimator, kNumFlows); | 391 gcc_test.RunVariableCapacity2MultipleFlows(kSendSideEstimator, kNumFlows); |
| 391 } | 392 } |
| 392 | 393 |
| 393 TEST_P(BweSimulation, GccComparison3) { | 394 TEST_P(BweSimulation, GccComparison3) { |
| 394 RunBidirectionalFlow(GetParam()); | 395 RunBidirectionalFlow(GetParam()); |
| 395 BweTest gcc_test(false); | 396 BweTest gcc_test(false); |
| 396 gcc_test.RunBidirectionalFlow(kFullSendSideEstimator); | 397 gcc_test.RunBidirectionalFlow(kSendSideEstimator); |
| 397 } | 398 } |
| 398 | 399 |
| 399 TEST_P(BweSimulation, GccComparison4) { | 400 TEST_P(BweSimulation, GccComparison4) { |
| 400 RunSelfFairness(GetParam()); | 401 RunSelfFairness(GetParam()); |
| 401 BweTest gcc_test(false); | 402 BweTest gcc_test(false); |
| 402 gcc_test.RunSelfFairness(GetParam()); | 403 gcc_test.RunSelfFairness(GetParam()); |
| 403 } | 404 } |
| 404 | 405 |
| 405 TEST_P(BweSimulation, GccComparison5) { | 406 TEST_P(BweSimulation, GccComparison5) { |
| 406 RunRoundTripTimeFairness(GetParam()); | 407 RunRoundTripTimeFairness(GetParam()); |
| 407 BweTest gcc_test(false); | 408 BweTest gcc_test(false); |
| 408 gcc_test.RunRoundTripTimeFairness(kFullSendSideEstimator); | 409 gcc_test.RunRoundTripTimeFairness(kSendSideEstimator); |
| 409 } | 410 } |
| 410 | 411 |
| 411 TEST_P(BweSimulation, GccComparison6) { | 412 TEST_P(BweSimulation, GccComparison6) { |
| 412 RunLongTcpFairness(GetParam()); | 413 RunLongTcpFairness(GetParam()); |
| 413 BweTest gcc_test(false); | 414 BweTest gcc_test(false); |
| 414 gcc_test.RunLongTcpFairness(kFullSendSideEstimator); | 415 gcc_test.RunLongTcpFairness(kSendSideEstimator); |
| 415 } | 416 } |
| 416 | 417 |
| 417 TEST_P(BweSimulation, GccComparison7) { | 418 TEST_P(BweSimulation, GccComparison7) { |
| 418 const int kNumTcpFiles = 10; | 419 const int kNumTcpFiles = 10; |
| 419 | 420 |
| 420 std::vector<int> tcp_file_sizes_bytes = | 421 std::vector<int> tcp_file_sizes_bytes = |
| 421 BweTest::GetFileSizesBytes(kNumTcpFiles); | 422 BweTest::GetFileSizesBytes(kNumTcpFiles); |
| 422 std::vector<int64_t> tcp_starting_times_ms = | 423 std::vector<int64_t> tcp_starting_times_ms = |
| 423 BweTest::GetStartingTimesMs(kNumTcpFiles); | 424 BweTest::GetStartingTimesMs(kNumTcpFiles); |
| 424 | 425 |
| 425 RunMultipleShortTcpFairness(GetParam(), tcp_file_sizes_bytes, | 426 RunMultipleShortTcpFairness(GetParam(), tcp_file_sizes_bytes, |
| 426 tcp_starting_times_ms); | 427 tcp_starting_times_ms); |
| 427 | 428 |
| 428 BweTest gcc_test(false); | 429 BweTest gcc_test(false); |
| 429 gcc_test.RunMultipleShortTcpFairness( | 430 gcc_test.RunMultipleShortTcpFairness(kSendSideEstimator, tcp_file_sizes_bytes, |
| 430 kFullSendSideEstimator, tcp_file_sizes_bytes, tcp_starting_times_ms); | 431 tcp_starting_times_ms); |
| 431 } | 432 } |
| 432 | 433 |
| 433 TEST_P(BweSimulation, GccComparison8) { | 434 TEST_P(BweSimulation, GccComparison8) { |
| 434 RunPauseResumeFlows(GetParam()); | 435 RunPauseResumeFlows(GetParam()); |
| 435 BweTest gcc_test(false); | 436 BweTest gcc_test(false); |
| 436 gcc_test.RunPauseResumeFlows(kFullSendSideEstimator); | 437 gcc_test.RunPauseResumeFlows(kSendSideEstimator); |
| 437 } | 438 } |
| 438 | 439 |
| 439 TEST_P(BweSimulation, GccComparisonChoke) { | 440 TEST_P(BweSimulation, GccComparisonChoke) { |
| 440 int array[] = {1000, 500, 1000}; | 441 int array[] = {1000, 500, 1000}; |
| 441 std::vector<int> capacities_kbps(array, array + 3); | 442 std::vector<int> capacities_kbps(array, array + 3); |
| 442 RunChoke(GetParam(), capacities_kbps); | 443 RunChoke(GetParam(), capacities_kbps); |
| 443 | 444 |
| 444 BweTest gcc_test(false); | 445 BweTest gcc_test(false); |
| 445 gcc_test.RunChoke(kFullSendSideEstimator, capacities_kbps); | 446 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps); |
| 446 } | 447 } |
| 447 | 448 |
| 448 } // namespace bwe | 449 } // namespace bwe |
| 449 } // namespace testing | 450 } // namespace testing |
| 450 } // namespace webrtc | 451 } // namespace webrtc |
| 451 | 452 |
| OLD | NEW |