diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Monitoring/Monitors')
11 files changed, 341 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs new file mode 100644 index 0000000..edc6e6b --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class AgentCountMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public AgentCountMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.SceneGraph.GetRootAgentCount(); | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Root Agent Count"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + " agent(s)"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs new file mode 100644 index 0000000..afe6b79 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class ChildAgentCountMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public ChildAgentCountMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.SceneGraph.GetChildAgentCount(); | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Child Agent Count"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + " child agent(s)"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs new file mode 100644 index 0000000..dec5a9e --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class EventFrameMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public EventFrameMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.MonitorEventTime; | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Total Event Frame Time"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + "ms"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs new file mode 100644 index 0000000..cd67fea --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs | |||
@@ -0,0 +1,26 @@ | |||
1 | using System; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class GCMemoryMonitor : IMonitor | ||
6 | { | ||
7 | #region Implementation of IMonitor | ||
8 | |||
9 | public double GetValue() | ||
10 | { | ||
11 | return GC.GetTotalMemory(false); | ||
12 | } | ||
13 | |||
14 | public string GetName() | ||
15 | { | ||
16 | return "GC Reported Memory"; | ||
17 | } | ||
18 | |||
19 | public string GetFriendlyValue() | ||
20 | { | ||
21 | return (int)(GetValue() / (1024*1024)) + "MB (Global)"; | ||
22 | } | ||
23 | |||
24 | #endregion | ||
25 | } | ||
26 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs new file mode 100644 index 0000000..d883fc7 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class LandFrameMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public LandFrameMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.MonitorLandTime; | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Land Frame Time"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + "ms"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs new file mode 100644 index 0000000..dd9b19d --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class ObjectCountMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public ObjectCountMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.SceneGraph.GetTotalObjectsCount(); | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Total Objects Count"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + " Object(s)"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs new file mode 100644 index 0000000..88f2938 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs | |||
@@ -0,0 +1,26 @@ | |||
1 | using System; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class PWSMemoryMonitor : IMonitor | ||
6 | { | ||
7 | #region Implementation of IMonitor | ||
8 | |||
9 | public double GetValue() | ||
10 | { | ||
11 | return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64; | ||
12 | } | ||
13 | |||
14 | public string GetName() | ||
15 | { | ||
16 | return "Private Working Set Memory"; | ||
17 | } | ||
18 | |||
19 | public string GetFriendlyValue() | ||
20 | { | ||
21 | return (int)(GetValue() / (1024 * 1024)) + "MB (Global)"; | ||
22 | } | ||
23 | |||
24 | #endregion | ||
25 | } | ||
26 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs new file mode 100644 index 0000000..4d62e4f --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class PhysicsFrameMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public PhysicsFrameMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.MonitorPhysicsSyncTime + m_scene.MonitorPhysicsUpdateTime; | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Total Physics Frame Time"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + "ms"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs new file mode 100644 index 0000000..91ac282 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class PhysicsUpdateFrameMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public PhysicsUpdateFrameMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.MonitorPhysicsUpdateTime; | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Physics Update Frame Time"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + "ms"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||
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 | } | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs new file mode 100644 index 0000000..dea1f94 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using OpenSim.Region.Framework.Scenes; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class TotalFrameMonitor : IMonitor | ||
6 | { | ||
7 | private readonly Scene m_scene; | ||
8 | |||
9 | public TotalFrameMonitor(Scene scene) | ||
10 | { | ||
11 | m_scene = scene; | ||
12 | } | ||
13 | |||
14 | #region Implementation of IMonitor | ||
15 | |||
16 | public double GetValue() | ||
17 | { | ||
18 | return m_scene.MonitorFrameTime; | ||
19 | } | ||
20 | |||
21 | public string GetName() | ||
22 | { | ||
23 | return "Total Frame Time"; | ||
24 | } | ||
25 | |||
26 | public string GetFriendlyValue() | ||
27 | { | ||
28 | return (int)GetValue() + "ms"; | ||
29 | } | ||
30 | |||
31 | #endregion | ||
32 | } | ||
33 | } | ||