rename prefix of scene-inventory.<scene-name>.ProcessedFetchInventoryRequests and QueuedFetchInventoryRequests to inventory.httpfetch.*

Actual inventory processing is done with a single set of static structures rather than per scene.
0.8.0.3
Justin Clark-Casey (justincc) 2014-03-21 23:29:31 +00:00
parent 6664079f84
commit 178a5a5585
1 changed files with 34 additions and 32 deletions

View File

@ -80,10 +80,10 @@ namespace OpenSim.Region.ClientStack.Linden
/// <remarks> /// <remarks>
/// It's the PollServiceRequestManager that actually sends completed requests back to the requester. /// It's the PollServiceRequestManager that actually sends completed requests back to the requester.
/// </remarks> /// </remarks>
public int ProcessedRequestsCount { get; set; } public static int ProcessedRequestsCount { get; set; }
private Stat m_queuedRequestsStat; private static Stat s_queuedRequestsStat;
private Stat m_processedRequestsStat; private static Stat s_processedRequestsStat;
public Scene Scene { get; private set; } public Scene Scene { get; private set; }
@ -141,8 +141,8 @@ namespace OpenSim.Region.ClientStack.Linden
Scene.EventManager.OnRegisterCaps -= RegisterCaps; Scene.EventManager.OnRegisterCaps -= RegisterCaps;
StatsManager.DeregisterStat(m_processedRequestsStat); StatsManager.DeregisterStat(s_processedRequestsStat);
StatsManager.DeregisterStat(m_queuedRequestsStat); StatsManager.DeregisterStat(s_queuedRequestsStat);
if (ProcessQueuedRequestsAsync) if (ProcessQueuedRequestsAsync)
{ {
@ -163,34 +163,36 @@ namespace OpenSim.Region.ClientStack.Linden
if (!m_Enabled) if (!m_Enabled)
return; return;
m_processedRequestsStat = if (s_processedRequestsStat == null)
s_processedRequestsStat =
new Stat( new Stat(
"ProcessedFetchInventoryRequests", "ProcessedFetchInventoryRequests",
"Number of processed fetch inventory requests", "Number of processed fetch inventory requests",
"These have not necessarily yet been dispatched back to the requester.", "These have not necessarily yet been dispatched back to the requester.",
"", "",
"scene-inventory", "inventory",
Scene.Name, "httpfetch",
StatType.Pull, StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime, MeasuresOfInterest.AverageChangeOverTime,
stat => { lock (m_queue) { stat.Value = ProcessedRequestsCount; } }, stat => { stat.Value = ProcessedRequestsCount; },
StatVerbosity.Debug); StatVerbosity.Debug);
m_queuedRequestsStat = if (s_queuedRequestsStat == null)
s_queuedRequestsStat =
new Stat( new Stat(
"QueuedFetchInventoryRequests", "QueuedFetchInventoryRequests",
"Number of fetch inventory requests queued for processing", "Number of fetch inventory requests queued for processing",
"", "",
"", "",
"scene-inventory", "inventory",
Scene.Name, "httpfetch",
StatType.Pull, StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime, MeasuresOfInterest.AverageChangeOverTime,
stat => { lock (m_queue) { stat.Value = m_queue.Count; } }, stat => { stat.Value = m_queue.Count; },
StatVerbosity.Debug); StatVerbosity.Debug);
StatsManager.RegisterStat(m_processedRequestsStat); StatsManager.RegisterStat(s_processedRequestsStat);
StatsManager.RegisterStat(m_queuedRequestsStat); StatsManager.RegisterStat(s_queuedRequestsStat);
m_InventoryService = Scene.InventoryService; m_InventoryService = Scene.InventoryService;
m_LibraryService = Scene.LibraryService; m_LibraryService = Scene.LibraryService;
@ -365,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden
lock (responses) lock (responses)
responses[requestID] = response; responses[requestID] = response;
m_module.ProcessedRequestsCount++; WebFetchInvDescModule.ProcessedRequestsCount++;
} }
} }