Rewrote NetEQ stats test.

BUG=
TEST=

Review URL: https://webrtc-codereview.appspot.com/466002

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1982 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org 2012-04-03 23:09:42 +00:00
parent 5f0c9f1ab4
commit afc39731dc
3 changed files with 53 additions and 42 deletions

View File

@ -0,0 +1,52 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "voice_engine/main/test/auto_test/fixtures/after_streaming_fixture.h"
class NetEQStatsTest : public AfterStreamingFixture {
};
TEST_F(NetEQStatsTest, ManualPrintStatisticsAfterRunningAWhile) {
Sleep(5000);
webrtc::NetworkStatistics network_statistics;
EXPECT_EQ(0, voe_neteq_stats_->GetNetworkStatistics(
channel_, network_statistics));
TEST_LOG("Inspect these statistics and ensure they make sense.\n");
TEST_LOG(" currentAccelerateRate = %hu \n",
network_statistics.currentAccelerateRate);
TEST_LOG(" currentBufferSize = %hu \n",
network_statistics.currentBufferSize);
TEST_LOG(" currentDiscardRate = %hu \n",
network_statistics.currentDiscardRate);
TEST_LOG(" currentExpandRate = %hu \n",
network_statistics.currentExpandRate);
TEST_LOG(" currentPacketLossRate = %hu \n",
network_statistics.currentPacketLossRate);
TEST_LOG(" currentPreemptiveRate = %hu \n",
network_statistics.currentPreemptiveRate);
TEST_LOG(" preferredBufferSize = %hu \n",
network_statistics.preferredBufferSize);
TEST_LOG(" jitterPeaksFound = %i \n",
network_statistics.jitterPeaksFound);
TEST_LOG(" clockDriftPPM = %i \n",
network_statistics.clockDriftPPM);
TEST_LOG(" meanWaitingTimeMs = %i \n",
network_statistics.meanWaitingTimeMs);
TEST_LOG(" medianWaitingTimeMs = %i \n",
network_statistics.medianWaitingTimeMs);
TEST_LOG(" minWaitingTimeMs = %i \n",
network_statistics.minWaitingTimeMs);
TEST_LOG(" maxWaitingTimeMs = %i \n",
network_statistics.maxWaitingTimeMs);
}

View File

@ -1035,49 +1035,7 @@ int VoETestManager::DoStandardTest() {
#else
TEST_LOG("\n\n+++ External media tests NOT ENABLED +++\n");
#endif // #ifdef _TEST_XMEDIA_
/////////////////////
// NetEQ statistics
#ifdef _TEST_NETEQ_STATS_
TEST_LOG("\n\n+++ NetEQ statistics tests +++\n\n");
#ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
NetworkStatistics nStats;
TEST_MUSTPASS(voe_neteq_stats_->GetNetworkStatistics(0, nStats));
TEST_LOG("\nNetwork statistics: \n");
TEST_LOG(" currentAccelerateRate = %hu \n",
nStats.currentAccelerateRate);
TEST_LOG(" currentBufferSize = %hu \n",
nStats.currentBufferSize);
TEST_LOG(" currentDiscardRate = %hu \n",
nStats.currentDiscardRate);
TEST_LOG(" currentExpandRate = %hu \n",
nStats.currentExpandRate);
TEST_LOG(" currentPacketLossRate = %hu \n",
nStats.currentPacketLossRate);
TEST_LOG(" currentPreemptiveRate = %hu \n",
nStats.currentPreemptiveRate);
TEST_LOG(" preferredBufferSize = %hu \n",
nStats.preferredBufferSize);
TEST_LOG(" jitterPeaksFound = %i \n",
nStats.jitterPeaksFound);
TEST_LOG(" clockDriftPPM = %i \n",
nStats.clockDriftPPM);
TEST_LOG(" meanWaitingTimeMs = %i \n",
nStats.meanWaitingTimeMs);
TEST_LOG(" medianWaitingTimeMs = %i \n",
nStats.medianWaitingTimeMs);
TEST_LOG(" minWaitingTimeMs = %i \n",
nStats.minWaitingTimeMs);
TEST_LOG(" maxWaitingTimeMs = %i \n",
nStats.maxWaitingTimeMs);
#else
TEST_LOG("Skipping NetEQ statistics tests - "
"WEBRTC_VOICE_ENGINE_NETEQ_STATS_API not defined \n");
#endif // #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API
#else
TEST_LOG("\n\n+++ NetEQ statistics tests NOT ENABLED +++\n");
#endif // #ifdef _TEST_NETEQ_STATS_
//////////////////
// Stop streaming
TEST_LOG("\n\n+++ Stop streaming +++\n\n");

View File

@ -47,6 +47,7 @@
'auto_test/standard/hardware_before_streaming_test.cc',
'auto_test/standard/hardware_test.cc',
'auto_test/standard/manual_hold_test.cc',
'auto_test/standard/neteq_stats_test.cc',
'auto_test/standard/neteq_test.cc',
'auto_test/standard/network_before_streaming_test.cc',
'auto_test/standard/network_test.cc',