diff options
author | Justin Clark-Casey (justincc) | 2013-07-08 22:03:07 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-07-08 22:03:07 +0100 |
commit | e19defde36ddbd5ff90d8304c6fe3b57110f8078 (patch) | |
tree | 63b349551f341f00a8a9c598a76343d7b453c328 /OpenSim/Capabilities/CapsHandlers.cs | |
parent | Make dictionary read/write locking consistent in CapabilitiesModule, rename t... (diff) | |
download | opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.zip opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.gz opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.bz2 opensim-SC-e19defde36ddbd5ff90d8304c6fe3b57110f8078.tar.xz |
Add "show caps stats by user" and "show caps stats by cap" console commands to print various counts of capability invocation by user and by cap
This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected.
This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle()
However, existing inheriting classes overriding Handle() will still work, albeit without stats recording.
"show caps" becomes "show caps list" to disambiguate between show caps commands
Diffstat (limited to 'OpenSim/Capabilities/CapsHandlers.cs')
-rw-r--r-- | OpenSim/Capabilities/CapsHandlers.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 458272d..890df90 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Capabilities | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class CapsHandlers | 40 | public class CapsHandlers |
41 | { | 41 | { |
42 | private Dictionary <string, IRequestHandler> m_capsHandlers = new Dictionary<string, IRequestHandler>(); | 42 | private Dictionary<string, IRequestHandler> m_capsHandlers = new Dictionary<string, IRequestHandler>(); |
43 | private IHttpServer m_httpListener; | 43 | private IHttpServer m_httpListener; |
44 | private string m_httpListenerHostName; | 44 | private string m_httpListenerHostName; |
45 | private uint m_httpListenerPort; | 45 | private uint m_httpListenerPort; |
@@ -184,5 +184,17 @@ namespace OpenSim.Framework.Capabilities | |||
184 | 184 | ||
185 | return caps; | 185 | return caps; |
186 | } | 186 | } |
187 | |||
188 | /// <summary> | ||
189 | /// Returns a copy of the dictionary of all the HTTP cap handlers | ||
190 | /// </summary> | ||
191 | /// <returns> | ||
192 | /// The dictionary copy. The key is the capability name, the value is the HTTP handler. | ||
193 | /// </returns> | ||
194 | public Dictionary<string, IRequestHandler> GetCapsHandlers() | ||
195 | { | ||
196 | lock (m_capsHandlers) | ||
197 | return new Dictionary<string, IRequestHandler>(m_capsHandlers); | ||
198 | } | ||
187 | } | 199 | } |
188 | } | 200 | } \ No newline at end of file |