From 178a5a558512b93ecd398904aaf31ab0389e577e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Mar 2014 23:29:31 +0000 Subject: rename prefix of scene-inventory..ProcessedFetchInventoryRequests and QueuedFetchInventoryRequests to inventory.httpfetch.* Actual inventory processing is done with a single set of static structures rather than per scene. --- .../Linden/Caps/WebFetchInvDescModule.cs | 70 +++++++++++----------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 6b7ddf2..d9812c9 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -80,10 +80,10 @@ namespace OpenSim.Region.ClientStack.Linden /// /// It's the PollServiceRequestManager that actually sends completed requests back to the requester. /// - public int ProcessedRequestsCount { get; set; } + public static int ProcessedRequestsCount { get; set; } - private Stat m_queuedRequestsStat; - private Stat m_processedRequestsStat; + private static Stat s_queuedRequestsStat; + private static Stat s_processedRequestsStat; public Scene Scene { get; private set; } @@ -141,8 +141,8 @@ namespace OpenSim.Region.ClientStack.Linden Scene.EventManager.OnRegisterCaps -= RegisterCaps; - StatsManager.DeregisterStat(m_processedRequestsStat); - StatsManager.DeregisterStat(m_queuedRequestsStat); + StatsManager.DeregisterStat(s_processedRequestsStat); + StatsManager.DeregisterStat(s_queuedRequestsStat); if (ProcessQueuedRequestsAsync) { @@ -163,34 +163,36 @@ namespace OpenSim.Region.ClientStack.Linden if (!m_Enabled) return; - m_processedRequestsStat = - new Stat( - "ProcessedFetchInventoryRequests", - "Number of processed fetch inventory requests", - "These have not necessarily yet been dispatched back to the requester.", - "", - "scene-inventory", - Scene.Name, - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => { lock (m_queue) { stat.Value = ProcessedRequestsCount; } }, - StatVerbosity.Debug); - - m_queuedRequestsStat = - new Stat( - "QueuedFetchInventoryRequests", - "Number of fetch inventory requests queued for processing", - "", - "", - "scene-inventory", - Scene.Name, - StatType.Pull, - MeasuresOfInterest.AverageChangeOverTime, - stat => { lock (m_queue) { stat.Value = m_queue.Count; } }, - StatVerbosity.Debug); - - StatsManager.RegisterStat(m_processedRequestsStat); - StatsManager.RegisterStat(m_queuedRequestsStat); + if (s_processedRequestsStat == null) + s_processedRequestsStat = + new Stat( + "ProcessedFetchInventoryRequests", + "Number of processed fetch inventory requests", + "These have not necessarily yet been dispatched back to the requester.", + "", + "inventory", + "httpfetch", + StatType.Pull, + MeasuresOfInterest.AverageChangeOverTime, + stat => { stat.Value = ProcessedRequestsCount; }, + StatVerbosity.Debug); + + if (s_queuedRequestsStat == null) + s_queuedRequestsStat = + new Stat( + "QueuedFetchInventoryRequests", + "Number of fetch inventory requests queued for processing", + "", + "", + "inventory", + "httpfetch", + StatType.Pull, + MeasuresOfInterest.AverageChangeOverTime, + stat => { stat.Value = m_queue.Count; }, + StatVerbosity.Debug); + + StatsManager.RegisterStat(s_processedRequestsStat); + StatsManager.RegisterStat(s_queuedRequestsStat); m_InventoryService = Scene.InventoryService; m_LibraryService = Scene.LibraryService; @@ -365,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden lock (responses) responses[requestID] = response; - m_module.ProcessedRequestsCount++; + WebFetchInvDescModule.ProcessedRequestsCount++; } } -- cgit v1.1