mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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
This commit is contained in:
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
public delegate bool CheckIdentityMethod(string sid, string aid);
|
||||
|
||||
public class RestDeserialiseSecureHandler<TRequest, TResponse> : BaseRequestHandler, IStreamHandler
|
||||
public class RestDeserialiseSecureHandler<TRequest, TResponse> : BaseOutputStreamHandler, IStreamHandler
|
||||
where TRequest : new()
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
@@ -201,7 +201,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_method = method;
|
||||
}
|
||||
|
||||
public void Handle(string path, Stream request, Stream responseStream,
|
||||
protected override void ProcessRequest(string path, Stream request, Stream responseStream,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
RestSessionObject<TRequest> deserial = default(RestSessionObject<TRequest>);
|
||||
@@ -237,7 +237,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
public delegate bool CheckTrustedSourceMethod(IPEndPoint peer);
|
||||
|
||||
public class RestDeserialiseTrustedHandler<TRequest, TResponse> : BaseRequestHandler, IStreamHandler
|
||||
public class RestDeserialiseTrustedHandler<TRequest, TResponse> : BaseOutputStreamHandler, IStreamHandler
|
||||
where TRequest : new()
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
@@ -260,7 +260,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
m_method = method;
|
||||
}
|
||||
|
||||
public void Handle(string path, Stream request, Stream responseStream,
|
||||
protected override void ProcessRequest(string path, Stream request, Stream responseStream,
|
||||
IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
|
||||
{
|
||||
TRequest deserial = default(TRequest);
|
||||
@@ -292,6 +292,5 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
serializer.Serialize(xmlWriter, response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user