Add clean test to NetEq perf test
Add another test to NetEqPerformanceTest with no packet losses or clock drift. The purpose of this test would be to focus on the "clean" code path, i.e., the path taken when there are no network problems. The reason is that this code path is presumably much lighter in complexity, and regressions could easily drown in the heavier code involved when combating losses and drift. BUG=2859 R=kjellander@webrtc.org Review URL: https://webrtc-codereview.appspot.com/7689005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5452 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
45a60c7fdc
commit
84eb0e952e
@ -13,6 +13,8 @@
|
||||
#include "webrtc/test/testsupport/perf_test.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
// Runs a test with 10% packet losses and 10% clock drift, to exercise
|
||||
// both loss concealment and time-stretching code.
|
||||
TEST(NetEqPerformanceTest, Run) {
|
||||
const int kSimulationTimeMs = 10000000;
|
||||
const int kLossPeriod = 10; // Drop every 10th packet.
|
||||
@ -21,5 +23,19 @@ TEST(NetEqPerformanceTest, Run) {
|
||||
kSimulationTimeMs, kLossPeriod, kDriftFactor);
|
||||
ASSERT_GT(runtime, 0);
|
||||
webrtc::test::PrintResult(
|
||||
"neteq4-runtime", "", "", runtime, "ms", true);
|
||||
"NetEq-performance", "", "10_pl_10_drift", runtime, "ms", true);
|
||||
}
|
||||
|
||||
// Runs a test with neither packet losses nor clock drift, to put
|
||||
// emphasis on the "good-weather" code path, which is presumably much
|
||||
// more lightweight.
|
||||
TEST(NetEqPerformanceTest, RunClean) {
|
||||
const int kSimulationTimeMs = 10000000;
|
||||
const int kLossPeriod = 0; // No losses.
|
||||
const double kDriftFactor = 0.0; // No clock drift.
|
||||
int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
|
||||
kSimulationTimeMs, kLossPeriod, kDriftFactor);
|
||||
ASSERT_GT(runtime, 0);
|
||||
webrtc::test::PrintResult(
|
||||
"NetEq-performance", "", "0_pl_0_drift", runtime, "ms", true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user