Add server stats for available builtin threadpool and iocp workers

cpu-performance
Justin Clark-Casey (justincc) 2013-06-17 22:55:25 +01:00
parent 0d2fd0d914
commit 2c9bb0f973
1 changed files with 16 additions and 0 deletions

View File

@ -157,6 +157,22 @@ namespace OpenSim.Framework.Monitoring
m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e);
}
MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerProcessor,
s =>
{
int workerThreads, iocpThreads;
ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
s.Value = workerThreads;
});
MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerProcessor,
s =>
{
int workerThreads, iocpThreads;
ThreadPool.GetAvailableThreads(out workerThreads, out iocpThreads);
s.Value = iocpThreads;
});
try
{
List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(','));