From dd369c6cc809e6f351a5bfa11a88847fb810aead Mon Sep 17 00:00:00 2001 From: brandtr Date: Wed, 16 Nov 2016 23:56:57 -0800 Subject: [PATCH] Reduce full stack test time to 45 secs and add H264 and FlexFEC. This CL adds full stack tests that are used to measure the performance of H264 with and without FlexFEC. In order to not increase the bot run time, the CL also reduces the test time to 45 secs. This should be OK, since the BWE is faster to ramp up nowadays. Due to the test time change, there may be some performance alerts. BUG=webrtc:5654 Review-Url: https://codereview.webrtc.org/2499273002 Cr-Commit-Position: refs/heads/master@{#15118} --- webrtc/BUILD.gn | 4 ++- webrtc/video/full_stack.cc | 50 +++++++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 2becbc74ea..1d14c906f3 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -611,7 +611,6 @@ if (rtc_include_tests) { deps += [ "//testing/android/native_test:native_test_native_code" ] shard_timeout = 900 } - if (is_ios) { deps += [ ":video_engine_tests_bundle_data" ] } @@ -689,6 +688,9 @@ if (rtc_include_tests) { # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] } + if (rtc_use_h264) { + defines += [ "WEBRTC_USE_H264" ] + } } rtc_test("webrtc_nonparallel_tests") { diff --git a/webrtc/video/full_stack.cc b/webrtc/video/full_stack.cc index 73744e01ed..276934850a 100644 --- a/webrtc/video/full_stack.cc +++ b/webrtc/video/full_stack.cc @@ -14,7 +14,7 @@ namespace webrtc { -static const int kFullStackTestDurationSecs = 60; +static const int kFullStackTestDurationSecs = 45; class FullStackTest : public VideoQualityTest { public: @@ -32,12 +32,21 @@ class FullStackTest : public VideoQualityTest { RunTest(foreman_cif); } - void ForemanCifPlr5(const std::string& video_codec) { + void ForemanCifPlr5(const std::string& video_codec, + bool use_ulpfec, + bool use_flexfec) { VideoQualityTest::Params foreman_cif; foreman_cif.video = {true, 352, 288, 30, 30000, 500000, 2000000, false, - video_codec, 1, 0, 0, false, false, "", "foreman_cif"}; - foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_" + video_codec, 0.0, - 0.0, kFullStackTestDurationSecs}; + video_codec, 1, 0, 0, use_ulpfec, use_flexfec, "", + "foreman_cif"}; + std::string fec_description; + if (use_ulpfec) + fec_description += "_ulpfec"; + if (use_flexfec) + fec_description += "_flexfec"; + foreman_cif.analyzer = { + "foreman_cif_delay_50_0_plr_5_" + video_codec + fec_description, 0.0, + 0.0, kFullStackTestDurationSecs}; foreman_cif.pipe.loss_percent = 5; foreman_cif.pipe.queue_delay_ms = 50; RunTest(foreman_cif); @@ -60,7 +69,9 @@ TEST_F(FullStackTest, ForemanCifWithoutPacketLossVp9) { } TEST_F(FullStackTest, ForemanCifPlr5Vp9) { - ForemanCifPlr5("VP9"); + const bool kUlpfec = false; + const bool kFlexfec = false; + ForemanCifPlr5("VP9", kUlpfec, kFlexfec); } #endif // !defined(RTC_DISABLE_VP9) @@ -97,6 +108,33 @@ TEST_F(FullStackTest, ForemanCifPlr5) { RunTest(foreman_cif); } +#if defined(WEBRTC_USE_H264) +TEST_F(FullStackTest, ForemanCifWithoutPacketlossH264) { + ForemanCifWithoutPacketLoss("H264"); +} + +TEST_F(FullStackTest, ForemanCifPlr5H264) { + const bool kUlpfec = false; + const bool kFlexfec = false; + ForemanCifPlr5("H264", kUlpfec, kFlexfec); +} + +// Verify that this is worth the bot time, before enabling. +TEST_F(FullStackTest, ForemanCifPlr5H264Flexfec) { + const bool kUlpfec = false; + const bool kFlexfec = true; + ForemanCifPlr5("H264", kUlpfec, kFlexfec); +} + +// Ulpfec with H264 is an unsupported combination, so this test is only useful +// for debugging. It is therefore disabled by default. +TEST_F(FullStackTest, DISABLED_ForemanCifPlr5H264Ulpfec) { + const bool kUlpfec = true; + const bool kFlexfec = false; + ForemanCifPlr5("H264", kUlpfec, kFlexfec); +} +#endif // defined(WEBRTC_USE_H264) + TEST_F(FullStackTest, ForemanCif500kbps) { VideoQualityTest::Params foreman_cif; foreman_cif.call.send_side_bwe = true;