diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-04 19:55:55 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-03-04 21:15:15 +0200 |
commit | 3efe5b493442f2b90ffbb571d8fa24c8ab17bf5e (patch) | |
tree | 75c85a5a5fc86f08573dd54508d17e9f1b0af2a4 /indra/llmessage/llpacketring.cpp | |
parent | c98002daa68163563b6c946a6d26c4c8b74176ae (diff) |
#3644 Fix new logging of packet drops hitting performance
Diffstat (limited to 'indra/llmessage/llpacketring.cpp')
-rw-r--r-- | indra/llmessage/llpacketring.cpp | 16 |
1 files changed, 15 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; +} |