Add clientstack.<scene>.OQRERequestsWaiting stat

Only present if OQRE is enabled
bullet-2.82
Justin Clark-Casey (justincc) 2014-08-19 00:42:19 +01:00
parent 84cea46c10
commit 88b2fc61ff
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 Stat m_oqreRequestsWaitingStat;
/// <summary>
/// Used to signal that we are ready to complete stop.
/// </summary>
@ -107,6 +109,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
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(
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;
}
}