diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs new file mode 100644 index 0000000..9300a93 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs | |||
@@ -0,0 +1,25 @@ | |||
1 | | ||
2 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
3 | { | ||
4 | class ThreadCountMonitor : IMonitor | ||
5 | { | ||
6 | #region Implementation of IMonitor | ||
7 | |||
8 | public double GetValue() | ||
9 | { | ||
10 | return System.Diagnostics.Process.GetCurrentProcess().Threads.Count; | ||
11 | } | ||
12 | |||
13 | public string GetName() | ||
14 | { | ||
15 | return "Total Threads"; | ||
16 | } | ||
17 | |||
18 | public string GetFriendlyValue() | ||
19 | { | ||
20 | return (int)GetValue() + " Thread(s) (Global)"; | ||
21 | } | ||
22 | |||
23 | #endregion | ||
24 | } | ||
25 | } | ||