From 711dde34e4e5da954a58393e1a177e8c6969b8b5 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 1 Nov 2009 19:37:40 +1100 Subject: * Implements new 'Monitoring' system for reporting performance. * Mostly the same set as the StatsMonitor used for Viewer notification, but exposes some new frametimes - including EventMS, PhysicsUpdateMS, LandUpdateMS; new memory monitoring - both GC.TotalMemory and Process.PrivateWorkingMemory64; also exposes ThreadCount (using System.Diagnostics.Process) * Type 'monitor report' on the console to see output. * SNMP Implementation forthcoming. --- .../Monitoring/Monitors/AgentCountMonitor.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs (limited to 'OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs') 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 @@ +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors +{ + class AgentCountMonitor : IMonitor + { + private readonly Scene m_scene; + + public AgentCountMonitor(Scene scene) + { + m_scene = scene; + } + + #region Implementation of IMonitor + + public double GetValue() + { + return m_scene.SceneGraph.GetRootAgentCount(); + } + + public string GetName() + { + return "Root Agent Count"; + } + + public string GetFriendlyValue() + { + return (int)GetValue() + " agent(s)"; + } + + #endregion + } +} -- cgit v1.1