summaryrefslogtreecommitdiff
path: root/indra/llmessage/llpacketring.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-13 23:55:38 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-03-18 21:25:09 +0200
commitc99e3167ed8549bc13d7df03b1e12dc15b0a080f (patch)
tree898e1979506ef7e82d7489e0e328143629a6face /indra/llmessage/llpacketring.cpp
parentd3d0728bac31099785fea1bf87f11b7c29d2425d (diff)
#3644 Adjust throttle based of how busy buffer is
Diffstat (limited to 'indra/llmessage/llpacketring.cpp')
-rw-r--r--indra/llmessage/llpacketring.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp
index da3c502e9d..eb6650c6c5 100644
--- a/indra/llmessage/llpacketring.cpp
+++ b/indra/llmessage/llpacketring.cpp
@@ -344,6 +344,12 @@ bool LLPacketRing::expandRing()
return true;
}
+F32 LLPacketRing::getBufferLoadRate() const
+{
+ // goes up to MAX_BUFFER_RING_SIZE
+ return (F32)mNumBufferedPackets / (F32)DEFAULT_BUFFER_RING_SIZE;
+}
+
void LLPacketRing::dumpPacketRingStats()
{
mNumDroppedPacketsTotal += mNumDroppedPackets;