mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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:
@@ -256,6 +256,12 @@ namespace OpenSim.Framework.Servers
|
||||
"Show thread status. Synonym for \"show threads\"",
|
||||
(string module, string[] args) => Notice(GetThreadsReport()));
|
||||
|
||||
m_console.Commands.AddCommand (
|
||||
"Debug", false, "debug comms set",
|
||||
"debug comms set serialosdreq true|false",
|
||||
"Set comms parameters. For debug purposes.",
|
||||
HandleDebugCommsSet);
|
||||
|
||||
m_console.Commands.AddCommand (
|
||||
"Debug", false, "debug threadpool set",
|
||||
"debug threadpool set worker|iocp min|max <n>",
|
||||
@@ -284,11 +290,42 @@ namespace OpenSim.Framework.Servers
|
||||
|
||||
public void RegisterCommonComponents(IConfigSource configSource)
|
||||
{
|
||||
IConfig networkConfig = configSource.Configs["Network"];
|
||||
|
||||
if (networkConfig != null)
|
||||
{
|
||||
WebUtil.SerializeOSDRequestsPerEndpoint = networkConfig.GetBoolean("SerializeOSDRequests", false);
|
||||
}
|
||||
|
||||
m_serverStatsCollector = new ServerStatsCollector();
|
||||
m_serverStatsCollector.Initialise(configSource);
|
||||
m_serverStatsCollector.Start();
|
||||
}
|
||||
|
||||
private void HandleDebugCommsSet(string module, string[] args)
|
||||
{
|
||||
if (args.Length != 5)
|
||||
{
|
||||
Notice("Usage: debug comms set serialosdreq true|false");
|
||||
return;
|
||||
}
|
||||
|
||||
if (args[3] != "serialosdreq")
|
||||
{
|
||||
Notice("Usage: debug comms set serialosdreq true|false");
|
||||
return;
|
||||
}
|
||||
|
||||
bool setSerializeOsdRequests;
|
||||
|
||||
if (!ConsoleUtil.TryParseConsoleBool(m_console, args[4], out setSerializeOsdRequests))
|
||||
return;
|
||||
|
||||
WebUtil.SerializeOSDRequestsPerEndpoint = setSerializeOsdRequests;
|
||||
|
||||
Notice("serialosdreq is now {0}", setSerializeOsdRequests);
|
||||
}
|
||||
|
||||
private void HandleDebugThreadpoolSet(string module, string[] args)
|
||||
{
|
||||
if (args.Length != 6)
|
||||
|
||||
Reference in New Issue
Block a user