From c99e3167ed8549bc13d7df03b1e12dc15b0a080f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 13 Mar 2025 23:55:38 +0200 Subject: #3644 Adjust throttle based of how busy buffer is --- indra/llmessage/llpacketring.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/llmessage/llpacketring.cpp') 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; -- cgit v1.2.3