diff options
author | Justin Clark-Casey (justincc) | 2013-06-18 00:10:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-06-18 00:10:21 +0100 |
commit | a1e32b843745581f7296359427a59e988814106b (patch) | |
tree | bc279c74dbbc84286e80eefb10ee4e62a4920d03 /OpenSim/Framework/Monitoring/ServerStatsCollector.cs | |
parent | refactor: Move existing code to generate report information on the threadpool... (diff) | |
download | opensim-SC-a1e32b843745581f7296359427a59e988814106b.zip opensim-SC-a1e32b843745581f7296359427a59e988814106b.tar.gz opensim-SC-a1e32b843745581f7296359427a59e988814106b.tar.bz2 opensim-SC-a1e32b843745581f7296359427a59e988814106b.tar.xz |
If SmartThreadPool is active, display statistical information about it in "show stats server"
Also puts these and previous builtin threadpool stats in the "threadpool" stat container rather than "processor"
Diffstat (limited to 'OpenSim/Framework/Monitoring/ServerStatsCollector.cs')
-rw-r--r-- | OpenSim/Framework/Monitoring/ServerStatsCollector.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs index c601c17..0ab4b93 100644 --- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Framework.Monitoring | |||
49 | 49 | ||
50 | public readonly string CategoryServer = "server"; | 50 | public readonly string CategoryServer = "server"; |
51 | 51 | ||
52 | public readonly string ContainerThreadpool = "threadpool"; | ||
52 | public readonly string ContainerProcessor = "processor"; | 53 | public readonly string ContainerProcessor = "processor"; |
53 | public readonly string ContainerMemory = "memory"; | 54 | public readonly string ContainerMemory = "memory"; |
54 | public readonly string ContainerNetwork = "network"; | 55 | public readonly string ContainerNetwork = "network"; |
@@ -157,7 +158,7 @@ namespace OpenSim.Framework.Monitoring | |||
157 | m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e); | 158 | m_log.ErrorFormat("{0} Exception creating 'Process': {1}", LogHeader, e); |
158 | } | 159 | } |
159 | 160 | ||
160 | MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerProcessor, | 161 | MakeStat("BuiltinThreadpoolWorkerThreadsAvailable", null, "threads", ContainerThreadpool, |
161 | s => | 162 | s => |
162 | { | 163 | { |
163 | int workerThreads, iocpThreads; | 164 | int workerThreads, iocpThreads; |
@@ -165,7 +166,7 @@ namespace OpenSim.Framework.Monitoring | |||
165 | s.Value = workerThreads; | 166 | s.Value = workerThreads; |
166 | }); | 167 | }); |
167 | 168 | ||
168 | MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerProcessor, | 169 | MakeStat("BuiltinThreadpoolIOCPThreadsAvailable", null, "threads", ContainerThreadpool, |
169 | s => | 170 | s => |
170 | { | 171 | { |
171 | int workerThreads, iocpThreads; | 172 | int workerThreads, iocpThreads; |
@@ -173,6 +174,16 @@ namespace OpenSim.Framework.Monitoring | |||
173 | s.Value = iocpThreads; | 174 | s.Value = iocpThreads; |
174 | }); | 175 | }); |
175 | 176 | ||
177 | if (Util.FireAndForgetMethod != null && Util.GetSmartThreadPoolInfo() != null) | ||
178 | { | ||
179 | MakeStat("STPMaxThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MaxThreads); | ||
180 | MakeStat("STPMinThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MinThreads); | ||
181 | MakeStat("STPConcurrency", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().MaxConcurrentWorkItems); | ||
182 | MakeStat("STPActiveThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().ActiveThreads); | ||
183 | MakeStat("STPInUseThreads", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().InUseThreads); | ||
184 | MakeStat("STPWorkItemsWaiting", null, "threads", ContainerThreadpool, s => s.Value = Util.GetSmartThreadPoolInfo().WaitingCallbacks); | ||
185 | } | ||
186 | |||
176 | try | 187 | try |
177 | { | 188 | { |
178 | List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(',')); | 189 | List<string> okInterfaceTypes = new List<string>(NetworkInterfaceTypes.Split(',')); |