diff options
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llpacketring.cpp | 16 | ||||
| -rw-r--r-- | indra/llmessage/llpacketring.h | 5 | ||||
| -rw-r--r-- | indra/llmessage/message.cpp | 1 | 
3 files changed, 21 insertions, 1 deletions
| diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index ae5a2168db..470398152c 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -304,7 +304,7 @@ S32 LLPacketRing::drainSocket(S32 socket)      S32 num_dropped_packets = (num_loops - 1 + old_num_packets) - mNumBufferedPackets;      if (num_dropped_packets > 0)      { -        LL_WARNS("Messaging") << "dropped " << num_dropped_packets << " UDP packets" << LL_ENDL; +        mNumDroppedPackets += num_dropped_packets;      }      return (S32)(mNumBufferedPackets);  } @@ -341,3 +341,17 @@ bool LLPacketRing::expandRing()      mHeadIndex = mNumBufferedPackets;      return true;  } + +void LLPacketRing::dumpPacketRingStats() +{ +    mNumDroppedPacketsTotal += mNumDroppedPackets; +    LL_INFOS("Messaging") << "Packet ring stats: " << std::endl +                          << "Buffered packets: " << mNumBufferedPackets << std::endl +                          << "Buffered bytes: " << mNumBufferedBytes << std::endl +                          << "Dropped packets current: " << mNumDroppedPackets << std::endl +                          << "Dropped packets total: " << mNumDroppedPacketsTotal << std::endl +                          << "Dropped packets percentage: " << mDropPercentage << "%" << std::endl +                          << "Actual in bytes: " << mActualBytesIn << std::endl +                          << "Actual out bytes: " << mActualBytesOut << LL_ENDL; +    mNumDroppedPackets = 0; +} diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h index 0dff2c63b1..237efc12e0 100644 --- a/indra/llmessage/llpacketring.h +++ b/indra/llmessage/llpacketring.h @@ -62,6 +62,9 @@ public:      S32 getNumBufferedPackets() const { return (S32)(mNumBufferedPackets); }      S32 getNumBufferedBytes() const { return mNumBufferedBytes; } +    S32 getNumDroppedPackets() const { return mNumDroppedPacketsTotal + mNumDroppedPackets; } + +    void dumpPacketRingStats();  protected:      // returns 'true' if we should intentionally drop a packet      bool computeDrop(); @@ -80,6 +83,8 @@ protected:      std::vector<LLPacketBuffer*> mPacketRing;      S16 mHeadIndex { 0 };      S16 mNumBufferedPackets { 0 }; +    S32 mNumDroppedPackets { 0 }; +    S32 mNumDroppedPacketsTotal { 0 };      S32 mNumBufferedBytes { 0 };      S32 mActualBytesIn { 0 }; diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index c130b7a6db..ad1ff86807 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -724,6 +724,7 @@ bool LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count )      // Check to see if we need to print debug info      if ((mt_sec - mCircuitPrintTime) > mCircuitPrintFreq)      { +        mPacketRing.dumpPacketRingStats();          dumpCircuitInfo();          mCircuitPrintTime = mt_sec;      } | 
