mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +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:
@@ -32,7 +32,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
{
|
||||
public interface IRequestHandler
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Name for this handler.
|
||||
/// </summary>
|
||||
@@ -59,6 +58,19 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
// Return path
|
||||
string Path { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of requests received by this handler
|
||||
/// </summary>
|
||||
int RequestsReceived { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of requests handled.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Should be equal to RequestsReceived unless requested are being handled slowly or there is deadlock.
|
||||
/// </remarks>
|
||||
int RequestsHandled { get; }
|
||||
}
|
||||
|
||||
public interface IStreamedRequestHandler : IRequestHandler
|
||||
@@ -69,7 +81,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
public interface IStreamHandler : IRequestHandler
|
||||
{
|
||||
// Handle request stream, return byte array
|
||||
void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user