aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-18 20:10:41 +0000
committerJustin Clark-Casey (justincc)2014-03-18 20:10:41 +0000
commite82d394ddf8eacf3afe9c66858c0186d2af295ef (patch)
tree0d99033516310a0530496e7985e4fee8adc3c09e /OpenSim/Region
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-e82d394ddf8eacf3afe9c66858c0186d2af295ef.zip
opensim-SC_OLD-e82d394ddf8eacf3afe9c66858c0186d2af295ef.tar.gz
opensim-SC_OLD-e82d394ddf8eacf3afe9c66858c0186d2af295ef.tar.bz2
opensim-SC_OLD-e82d394ddf8eacf3afe9c66858c0186d2af295ef.tar.xz
Add scene.<scene-name>.QueuedFetchInventoryRequests stat
This is to aid in detecting whether there are fetch inventory requests remaining to be processed.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index f0dccda..2544c7f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -74,6 +74,8 @@ namespace OpenSim.Region.ClientStack.Linden
74 /// </remarks> 74 /// </remarks>
75 public bool ProcessQueuedRequestsAsync { get; private set; } 75 public bool ProcessQueuedRequestsAsync { get; private set; }
76 76
77 private Stat m_queuedRequestsStat;
78
77 private Scene m_scene; 79 private Scene m_scene;
78 80
79 private IInventoryService m_InventoryService; 81 private IInventoryService m_InventoryService;
@@ -130,6 +132,8 @@ namespace OpenSim.Region.ClientStack.Linden
130 132
131 m_scene.EventManager.OnRegisterCaps -= RegisterCaps; 133 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
132 134
135 StatsManager.DeregisterStat(m_queuedRequestsStat);
136
133 if (ProcessQueuedRequestsAsync) 137 if (ProcessQueuedRequestsAsync)
134 { 138 {
135 if (m_workerThreads != null) 139 if (m_workerThreads != null)
@@ -149,6 +153,21 @@ namespace OpenSim.Region.ClientStack.Linden
149 if (!m_Enabled) 153 if (!m_Enabled)
150 return; 154 return;
151 155
156 m_queuedRequestsStat =
157 new Stat(
158 "QueuedFetchInventoryRequests",
159 "Number of fetch inventory requests queued for processing",
160 "",
161 "",
162 "scene",
163 m_scene.Name,
164 StatType.Pull,
165 MeasuresOfInterest.AverageChangeOverTime,
166 stat => { lock (m_queue) { stat.Value = m_queue.Count; } },
167 StatVerbosity.Debug);
168
169 StatsManager.RegisterStat(m_queuedRequestsStat);
170
152 m_InventoryService = m_scene.InventoryService; 171 m_InventoryService = m_scene.InventoryService;
153 m_LibraryService = m_scene.LibraryService; 172 m_LibraryService = m_scene.LibraryService;
154 173