Add clientstack.<scene>.OQRERequestsWaiting stat

Only present if OQRE is enabled
0.8-extended
Justin Clark-Casey (justincc) 2014-08-19 00:42:19 +01:00 committed by Justin Clark-Casey
parent 34a5c3be24
commit c83eb4eb0a
1 changed files with 19 additions and 0 deletions

View File

@ -74,6 +74,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private LLUDPServer m_udpServer; private LLUDPServer m_udpServer;
private Stat m_oqreRequestsWaitingStat;
/// <summary> /// <summary>
/// Used to signal that we are ready to complete stop. /// Used to signal that we are ready to complete stop.
/// </summary> /// </summary>
@ -107,6 +109,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_requestQueue = new BlockingCollection<RefillRequest>(new ConcurrentQueue<RefillRequest>(), 5000); m_requestQueue = new BlockingCollection<RefillRequest>(new ConcurrentQueue<RefillRequest>(), 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( Watchdog.StartThread(
ProcessRequests, ProcessRequests,
String.Format("OutgoingQueueRefillEngineThread ({0})", m_udpServer.Scene.Name), String.Format("OutgoingQueueRefillEngineThread ({0})", m_udpServer.Scene.Name),
@ -161,6 +178,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
finally finally
{ {
m_cancelSource.Dispose(); m_cancelSource.Dispose();
StatsManager.DeregisterStat(m_oqreRequestsWaitingStat);
m_oqreRequestsWaitingStat = null;
m_requestQueue = null; m_requestQueue = null;
} }
} }