Make it possible to switch whether we serialize osd requests per endpoint or not, either via config (SerializeOSDRequests in [Network]) or via the "debug comms set" console command.

For debug purposes to assess what impact this has on network response in a heavy test environment.
This commit is contained in:
Justin Clark-Casey (justincc)
2013-08-05 23:44:48 +01:00
parent f9dc5815c4
commit 9bcf072795
3 changed files with 74 additions and 5 deletions

View File

@@ -66,6 +66,11 @@ namespace OpenSim.Framework
/// </summary>
public static int RequestNumber { get; internal set; }
/// <summary>
/// Control where OSD requests should be serialized per endpoint.
/// </summary>
public static bool SerializeOSDRequestsPerEndpoint { get; set; }
/// <summary>
/// this is the header field used to communicate the local request id
/// used for performance and debugging
@@ -145,10 +150,17 @@ namespace OpenSim.Framework
public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout, bool compressed)
{
//lock (EndPointLock(url))
//{
return ServiceOSDRequestWorker(url,data,method,timeout,compressed);
//}
if (SerializeOSDRequestsPerEndpoint)
{
lock (EndPointLock(url))
{
return ServiceOSDRequestWorker(url, data, method, timeout, compressed);
}
}
else
{
return ServiceOSDRequestWorker(url, data, method, timeout, compressed);
}
}
public static void LogOutgoingDetail(Stream outputStream)