diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs b/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs index 8777402fc4..0659d8e47e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs @@ -74,6 +74,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private LLUDPServer m_udpServer; + private Stat m_oqreRequestsWaitingStat; + /// /// Used to signal that we are ready to complete stop. /// @@ -107,6 +109,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_requestQueue = new BlockingCollection(new ConcurrentQueue(), 5000); + m_oqreRequestsWaitingStat = + new Stat( + "OQRERequestsWaiting", + "Number of outgong queue refill requests waiting for processing.", + "", + "", + "clientstack", + m_udpServer.Scene.Name, + StatType.Pull, + MeasuresOfInterest.None, + stat => stat.Value = m_requestQueue.Count, + StatVerbosity.Debug); + + StatsManager.RegisterStat(m_oqreRequestsWaitingStat); + Watchdog.StartThread( ProcessRequests, String.Format("OutgoingQueueRefillEngineThread ({0})", m_udpServer.Scene.Name), @@ -161,6 +178,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP finally { m_cancelSource.Dispose(); + StatsManager.DeregisterStat(m_oqreRequestsWaitingStat); + m_oqreRequestsWaitingStat = null; m_requestQueue = null; } }