Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / neteq4 / test / neteq_performance_unittest.cc
1 /*
2  *  Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "webrtc/modules/audio_coding/neteq4/tools/neteq_performance_test.h"
13 #include "webrtc/test/testsupport/perf_test.h"
14 #include "webrtc/typedefs.h"
15
16 TEST(NetEqPerformanceTest, Run) {
17   const int kSimulationTimeMs = 10000000;
18   const int kLossPeriod = 10;  // Drop every 10th packet.
19   const double kDriftFactor = 0.1;
20   int64_t runtime = webrtc::test::NetEqPerformanceTest::Run(
21       kSimulationTimeMs, kLossPeriod, kDriftFactor);
22   ASSERT_GT(runtime, 0);
23   webrtc::test::PrintResult(
24       "neteq4-runtime", "", "", runtime, "ms", true);
25 }