aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-21 23:29:31 +0000
committerJustin Clark-Casey (justincc)2014-03-21 23:29:31 +0000
commit178a5a558512b93ecd398904aaf31ab0389e577e (patch)
treee32fd878ecae09f03d5a423a0962fa09f51c78da
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-178a5a558512b93ecd398904aaf31ab0389e577e.zip
opensim-SC_OLD-178a5a558512b93ecd398904aaf31ab0389e577e.tar.gz
opensim-SC_OLD-178a5a558512b93ecd398904aaf31ab0389e577e.tar.bz2
opensim-SC_OLD-178a5a558512b93ecd398904aaf31ab0389e577e.tar.xz
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.
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs70
1 files 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
80 /// <remarks> 80 /// <remarks>
81 /// It's the PollServiceRequestManager that actually sends completed requests back to the requester. 81 /// It's the PollServiceRequestManager that actually sends completed requests back to the requester.
82 /// </remarks> 82 /// </remarks>
83 public int ProcessedRequestsCount { get; set; } 83 public static int ProcessedRequestsCount { get; set; }
84 84
85 private Stat m_queuedRequestsStat; 85 private static Stat s_queuedRequestsStat;
86 private Stat m_processedRequestsStat; 86 private static Stat s_processedRequestsStat;
87 87
88 public Scene Scene { get; private set; } 88 public Scene Scene { get; private set; }
89 89
@@ -141,8 +141,8 @@ namespace OpenSim.Region.ClientStack.Linden
141 141
142 Scene.EventManager.OnRegisterCaps -= RegisterCaps; 142 Scene.EventManager.OnRegisterCaps -= RegisterCaps;
143 143
144 StatsManager.DeregisterStat(m_processedRequestsStat); 144 StatsManager.DeregisterStat(s_processedRequestsStat);
145 StatsManager.DeregisterStat(m_queuedRequestsStat); 145 StatsManager.DeregisterStat(s_queuedRequestsStat);
146 146
147 if (ProcessQueuedRequestsAsync) 147 if (ProcessQueuedRequestsAsync)
148 { 148 {
@@ -163,34 +163,36 @@ namespace OpenSim.Region.ClientStack.Linden
163 if (!m_Enabled) 163 if (!m_Enabled)
164 return; 164 return;
165 165
166 m_processedRequestsStat = 166 if (s_processedRequestsStat == null)
167 new Stat( 167 s_processedRequestsStat =
168 "ProcessedFetchInventoryRequests", 168 new Stat(
169 "Number of processed fetch inventory requests", 169 "ProcessedFetchInventoryRequests",
170 "These have not necessarily yet been dispatched back to the requester.", 170 "Number of processed fetch inventory requests",
171 "", 171 "These have not necessarily yet been dispatched back to the requester.",
172 "scene-inventory", 172 "",
173 Scene.Name, 173 "inventory",
174 StatType.Pull, 174 "httpfetch",
175 MeasuresOfInterest.AverageChangeOverTime, 175 StatType.Pull,
176 stat => { lock (m_queue) { stat.Value = ProcessedRequestsCount; } }, 176 MeasuresOfInterest.AverageChangeOverTime,
177 StatVerbosity.Debug); 177 stat => { stat.Value = ProcessedRequestsCount; },
178 178 StatVerbosity.Debug);
179 m_queuedRequestsStat = 179
180 new Stat( 180 if (s_queuedRequestsStat == null)
181 "QueuedFetchInventoryRequests", 181 s_queuedRequestsStat =
182 "Number of fetch inventory requests queued for processing", 182 new Stat(
183 "", 183 "QueuedFetchInventoryRequests",
184 "", 184 "Number of fetch inventory requests queued for processing",
185 "scene-inventory", 185 "",
186 Scene.Name, 186 "",
187 StatType.Pull, 187 "inventory",
188 MeasuresOfInterest.AverageChangeOverTime, 188 "httpfetch",
189 stat => { lock (m_queue) { stat.Value = m_queue.Count; } }, 189 StatType.Pull,
190 StatVerbosity.Debug); 190 MeasuresOfInterest.AverageChangeOverTime,
191 191 stat => { stat.Value = m_queue.Count; },
192 StatsManager.RegisterStat(m_processedRequestsStat); 192 StatVerbosity.Debug);
193 StatsManager.RegisterStat(m_queuedRequestsStat); 193
194 StatsManager.RegisterStat(s_processedRequestsStat);
195 StatsManager.RegisterStat(s_queuedRequestsStat);
194 196
195 m_InventoryService = Scene.InventoryService; 197 m_InventoryService = Scene.InventoryService;
196 m_LibraryService = Scene.LibraryService; 198 m_LibraryService = Scene.LibraryService;
@@ -365,7 +367,7 @@ namespace OpenSim.Region.ClientStack.Linden
365 lock (responses) 367 lock (responses)
366 responses[requestID] = response; 368 responses[requestID] = response;
367 369
368 m_module.ProcessedRequestsCount++; 370 WebFetchInvDescModule.ProcessedRequestsCount++;
369 } 371 }
370 } 372 }
371 373