diff options
author | Diva Canto | 2009-10-05 20:39:23 -0700 |
---|---|---|
committer | Diva Canto | 2009-10-05 20:39:23 -0700 |
commit | e36a54ee2ab7b9e8f9c9170610a942c261eb270c (patch) | |
tree | cd11bb1b497d95897dbab3633f4b4e93ed88d7c6 /OpenSim | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-e36a54ee2ab7b9e8f9c9170610a942c261eb270c.zip opensim-SC_OLD-e36a54ee2ab7b9e8f9c9170610a942c261eb270c.tar.gz opensim-SC_OLD-e36a54ee2ab7b9e8f9c9170610a942c261eb270c.tar.bz2 opensim-SC_OLD-e36a54ee2ab7b9e8f9c9170610a942c261eb270c.tar.xz |
#if DEBBUG code for monitoring the ThreadPool.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 606135b..35e57e5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -962,6 +962,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
962 | int maintc = 0; | 962 | int maintc = 0; |
963 | while (!shuttingdown) | 963 | while (!shuttingdown) |
964 | { | 964 | { |
965 | #if DEBUG | ||
966 | int w = 0, io = 0, maxw=0, maxio=0; | ||
967 | ThreadPool.GetAvailableThreads(out w, out io); | ||
968 | ThreadPool.GetMaxThreads(out maxw, out maxio); | ||
969 | if ((maxw - w < 10) || (maxio - io < 10)) | ||
970 | m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}({1}); io = {2}({3})", w, io, maxw, maxio); | ||
971 | #endif | ||
965 | maintc = Environment.TickCount; | 972 | maintc = Environment.TickCount; |
966 | 973 | ||
967 | TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate; | 974 | TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate; |