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 kSendSideEstimator, |
51 kNadaEstimator)); | 51 kNadaEstimator)); |
52 | 52 |
53 TEST_P(BweSimulation, SprintUplinkTest) { | 53 TEST_P(BweSimulation, SprintUplinkTest) { |
54 AdaptiveVideoSource source(0, 30, 300, 0, 0); | 54 AdaptiveVideoSource source(0, 30, 300, 0, 0); |
55 VideoSender sender(&uplink_, &source, GetParam()); | 55 VideoSender sender(&uplink_, &source, GetParam()); |
56 RateCounterFilter counter1(&uplink_, 0, "sender_output", | 56 RateCounterFilter counter1(&uplink_, 0, "sender_output", |
57 bwe_names[GetParam()]); | 57 bwe_names[GetParam()]); |
58 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); | 58 TraceBasedDeliveryFilter filter(&uplink_, 0, "link_capacity"); |
59 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); | 59 RateCounterFilter counter2(&uplink_, 0, "Receiver", bwe_names[GetParam()]); |
60 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); | 60 PacketReceiver receiver(&uplink_, 0, GetParam(), true, true); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; | 325 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; |
326 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 500, 50, 0, offset_ms); | 326 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 500, 50, 0, offset_ms); |
327 } | 327 } |
328 | 328 |
329 TEST_P(BweSimulation, TcpFairness1000msTest) { | 329 TEST_P(BweSimulation, TcpFairness1000msTest) { |
330 const int kAverageOffsetMs = 20 * 1000; | 330 const int kAverageOffsetMs = 20 * 1000; |
331 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; | 331 int64_t offset_ms[] = {random_.Rand(2 * kAverageOffsetMs), 0}; |
332 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 1000, 50, 0, offset_ms); | 332 RunFairnessTest(GetParam(), 1, 1, 1000, 2000, 1000, 50, 0, offset_ms); |
333 } | 333 } |
334 | 334 |
335 // The following test cases begin with "Evaluation" as a referrence to the | 335 // The following test cases begin with "Evaluation" as a reference to the |
336 // Internet draft https://tools.ietf.org/html/draft-ietf-rmcat-eval-test-01. | 336 // Internet draft https://tools.ietf.org/html/draft-ietf-rmcat-eval-test-01. |
337 | 337 |
338 TEST_P(BweSimulation, Evaluation1) { | 338 TEST_P(BweSimulation, Evaluation1) { |
339 RunVariableCapacity1SingleFlow(GetParam()); | 339 RunVariableCapacity1SingleFlow(GetParam()); |
340 } | 340 } |
341 | 341 |
342 TEST_P(BweSimulation, Evaluation2) { | 342 TEST_P(BweSimulation, Evaluation2) { |
343 const size_t kNumFlows = 2; | 343 const size_t kNumFlows = 2; |
344 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); | 344 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); |
345 } | 345 } |
(...skipping 27 matching lines...) Expand all Loading... |
373 TEST_P(BweSimulation, Evaluation8) { | 373 TEST_P(BweSimulation, Evaluation8) { |
374 RunPauseResumeFlows(GetParam()); | 374 RunPauseResumeFlows(GetParam()); |
375 } | 375 } |
376 | 376 |
377 // Following test cases begin with "GccComparison" run the | 377 // Following test cases begin with "GccComparison" run the |
378 // evaluation test cases for both GCC and other calling RMCAT. | 378 // evaluation test cases for both GCC and other calling RMCAT. |
379 | 379 |
380 TEST_P(BweSimulation, GccComparison1) { | 380 TEST_P(BweSimulation, GccComparison1) { |
381 RunVariableCapacity1SingleFlow(GetParam()); | 381 RunVariableCapacity1SingleFlow(GetParam()); |
382 BweTest gcc_test(false); | 382 BweTest gcc_test(false); |
383 gcc_test.RunVariableCapacity1SingleFlow(kFullSendSideEstimator); | 383 gcc_test.RunVariableCapacity1SingleFlow(kSendSideEstimator); |
384 } | 384 } |
385 | 385 |
386 TEST_P(BweSimulation, GccComparison2) { | 386 TEST_P(BweSimulation, GccComparison2) { |
387 const size_t kNumFlows = 2; | 387 const size_t kNumFlows = 2; |
388 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); | 388 RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows); |
389 BweTest gcc_test(false); | 389 BweTest gcc_test(false); |
390 gcc_test.RunVariableCapacity2MultipleFlows(kFullSendSideEstimator, kNumFlows); | 390 gcc_test.RunVariableCapacity2MultipleFlows(kSendSideEstimator, kNumFlows); |
391 } | 391 } |
392 | 392 |
393 TEST_P(BweSimulation, GccComparison3) { | 393 TEST_P(BweSimulation, GccComparison3) { |
394 RunBidirectionalFlow(GetParam()); | 394 RunBidirectionalFlow(GetParam()); |
395 BweTest gcc_test(false); | 395 BweTest gcc_test(false); |
396 gcc_test.RunBidirectionalFlow(kFullSendSideEstimator); | 396 gcc_test.RunBidirectionalFlow(kSendSideEstimator); |
397 } | 397 } |
398 | 398 |
399 TEST_P(BweSimulation, GccComparison4) { | 399 TEST_P(BweSimulation, GccComparison4) { |
400 RunSelfFairness(GetParam()); | 400 RunSelfFairness(GetParam()); |
401 BweTest gcc_test(false); | 401 BweTest gcc_test(false); |
402 gcc_test.RunSelfFairness(GetParam()); | 402 gcc_test.RunSelfFairness(GetParam()); |
403 } | 403 } |
404 | 404 |
405 TEST_P(BweSimulation, GccComparison5) { | 405 TEST_P(BweSimulation, GccComparison5) { |
406 RunRoundTripTimeFairness(GetParam()); | 406 RunRoundTripTimeFairness(GetParam()); |
407 BweTest gcc_test(false); | 407 BweTest gcc_test(false); |
408 gcc_test.RunRoundTripTimeFairness(kFullSendSideEstimator); | 408 gcc_test.RunRoundTripTimeFairness(kSendSideEstimator); |
409 } | 409 } |
410 | 410 |
411 TEST_P(BweSimulation, GccComparison6) { | 411 TEST_P(BweSimulation, GccComparison6) { |
412 RunLongTcpFairness(GetParam()); | 412 RunLongTcpFairness(GetParam()); |
413 BweTest gcc_test(false); | 413 BweTest gcc_test(false); |
414 gcc_test.RunLongTcpFairness(kFullSendSideEstimator); | 414 gcc_test.RunLongTcpFairness(kSendSideEstimator); |
415 } | 415 } |
416 | 416 |
417 TEST_P(BweSimulation, GccComparison7) { | 417 TEST_P(BweSimulation, GccComparison7) { |
418 const int kNumTcpFiles = 10; | 418 const int kNumTcpFiles = 10; |
419 | 419 |
420 std::vector<int> tcp_file_sizes_bytes = | 420 std::vector<int> tcp_file_sizes_bytes = |
421 BweTest::GetFileSizesBytes(kNumTcpFiles); | 421 BweTest::GetFileSizesBytes(kNumTcpFiles); |
422 std::vector<int64_t> tcp_starting_times_ms = | 422 std::vector<int64_t> tcp_starting_times_ms = |
423 BweTest::GetStartingTimesMs(kNumTcpFiles); | 423 BweTest::GetStartingTimesMs(kNumTcpFiles); |
424 | 424 |
425 RunMultipleShortTcpFairness(GetParam(), tcp_file_sizes_bytes, | 425 RunMultipleShortTcpFairness(GetParam(), tcp_file_sizes_bytes, |
426 tcp_starting_times_ms); | 426 tcp_starting_times_ms); |
427 | 427 |
428 BweTest gcc_test(false); | 428 BweTest gcc_test(false); |
429 gcc_test.RunMultipleShortTcpFairness( | 429 gcc_test.RunMultipleShortTcpFairness(kSendSideEstimator, tcp_file_sizes_bytes, |
430 kFullSendSideEstimator, tcp_file_sizes_bytes, tcp_starting_times_ms); | 430 tcp_starting_times_ms); |
431 } | 431 } |
432 | 432 |
433 TEST_P(BweSimulation, GccComparison8) { | 433 TEST_P(BweSimulation, GccComparison8) { |
434 RunPauseResumeFlows(GetParam()); | 434 RunPauseResumeFlows(GetParam()); |
435 BweTest gcc_test(false); | 435 BweTest gcc_test(false); |
436 gcc_test.RunPauseResumeFlows(kFullSendSideEstimator); | 436 gcc_test.RunPauseResumeFlows(kSendSideEstimator); |
437 } | 437 } |
438 | 438 |
439 TEST_P(BweSimulation, GccComparisonChoke) { | 439 TEST_P(BweSimulation, GccComparisonChoke) { |
440 int array[] = {1000, 500, 1000}; | 440 int array[] = {1000, 500, 1000}; |
441 std::vector<int> capacities_kbps(array, array + 3); | 441 std::vector<int> capacities_kbps(array, array + 3); |
442 RunChoke(GetParam(), capacities_kbps); | 442 RunChoke(GetParam(), capacities_kbps); |
443 | 443 |
444 BweTest gcc_test(false); | 444 BweTest gcc_test(false); |
445 gcc_test.RunChoke(kFullSendSideEstimator, capacities_kbps); | 445 gcc_test.RunChoke(kSendSideEstimator, capacities_kbps); |
446 } | 446 } |
447 | 447 |
448 } // namespace bwe | 448 } // namespace bwe |
449 } // namespace testing | 449 } // namespace testing |
450 } // namespace webrtc | 450 } // namespace webrtc |
451 | 451 |
OLD | NEW |