Home | History | Annotate | Download | only in standard
      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 
     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("    currentDiscardRate        = %hu \n",
     31       network_statistics.currentDiscardRate);
     32   TEST_LOG("    currentExpandRate         = %hu \n",
     33       network_statistics.currentExpandRate);
     34   TEST_LOG("    currentPacketLossRate     = %hu \n",
     35       network_statistics.currentPacketLossRate);
     36   TEST_LOG("    currentPreemptiveRate     = %hu \n",
     37       network_statistics.currentPreemptiveRate);
     38   TEST_LOG("    preferredBufferSize       = %hu \n",
     39       network_statistics.preferredBufferSize);
     40   TEST_LOG("    jitterPeaksFound          = %i \n",
     41       network_statistics.jitterPeaksFound);
     42   TEST_LOG("    clockDriftPPM             = %i \n",
     43       network_statistics.clockDriftPPM);
     44   TEST_LOG("    meanWaitingTimeMs         = %i \n",
     45       network_statistics.meanWaitingTimeMs);
     46   TEST_LOG("    medianWaitingTimeMs       = %i \n",
     47       network_statistics.medianWaitingTimeMs);
     48   TEST_LOG("    minWaitingTimeMs          = %i \n",
     49       network_statistics.minWaitingTimeMs);
     50   TEST_LOG("    maxWaitingTimeMs          = %i \n",
     51       network_statistics.maxWaitingTimeMs);
     52 
     53   // This is only set to a non-zero value in off-mode.
     54   EXPECT_EQ(0, network_statistics.addedSamples);
     55 }
     56