1 /*
2 * Copyright (c) 2012 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 "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
12
13 class NetEQStatsTest : public AfterStreamingFixture {
14 };
15
TEST_F(NetEQStatsTest,ManualPrintStatisticsAfterRunningAWhile)16 TEST_F(NetEQStatsTest, ManualPrintStatisticsAfterRunningAWhile) {
17 Sleep(5000);
18
19 webrtc::NetworkStatistics network_statistics;
20
21 EXPECT_EQ(0, voe_neteq_stats_->GetNetworkStatistics(
22 channel_, network_statistics));
23
24 TEST_LOG("Inspect these statistics and ensure they make sense.\n");
25
26 TEST_LOG(" currentAccelerateRate = %hu \n",
27 network_statistics.currentAccelerateRate);
28 TEST_LOG(" currentBufferSize = %hu \n",
29 network_statistics.currentBufferSize);
30 TEST_LOG(" currentSecondaryDecodedRate = %hu \n",
31 network_statistics.currentSecondaryDecodedRate);
32 TEST_LOG(" currentDiscardRate = %hu \n",
33 network_statistics.currentDiscardRate);
34 TEST_LOG(" currentExpandRate = %hu \n",
35 network_statistics.currentExpandRate);
36 TEST_LOG(" currentPacketLossRate = %hu \n",
37 network_statistics.currentPacketLossRate);
38 TEST_LOG(" currentPreemptiveRate = %hu \n",
39 network_statistics.currentPreemptiveRate);
40 TEST_LOG(" currentSpeechExpandRate = %hu \n",
41 network_statistics.currentSpeechExpandRate);
42 TEST_LOG(" preferredBufferSize = %hu \n",
43 network_statistics.preferredBufferSize);
44 TEST_LOG(" jitterPeaksFound = %i \n",
45 network_statistics.jitterPeaksFound);
46 TEST_LOG(" clockDriftPPM = %i \n",
47 network_statistics.clockDriftPPM);
48 TEST_LOG(" meanWaitingTimeMs = %i \n",
49 network_statistics.meanWaitingTimeMs);
50 TEST_LOG(" medianWaitingTimeMs = %i \n",
51 network_statistics.medianWaitingTimeMs);
52 TEST_LOG(" minWaitingTimeMs = %i \n",
53 network_statistics.minWaitingTimeMs);
54 TEST_LOG(" maxWaitingTimeMs = %i \n",
55 network_statistics.maxWaitingTimeMs);
56
57 // This is only set to a non-zero value in off-mode.
58 EXPECT_EQ(0U, network_statistics.addedSamples);
59 }
60