diff options
author | Adam Frisby | 2009-11-01 19:37:40 +1100 |
---|---|---|
committer | Adam Frisby | 2009-11-01 19:37:40 +1100 |
commit | 711dde34e4e5da954a58393e1a177e8c6969b8b5 (patch) | |
tree | a1411439bd3a5a897626d640dfd540bae26c9545 /OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs | |
parent | Patch + minor formatting fixes. (diff) | |
download | opensim-SC_OLD-711dde34e4e5da954a58393e1a177e8c6969b8b5.zip opensim-SC_OLD-711dde34e4e5da954a58393e1a177e8c6969b8b5.tar.gz opensim-SC_OLD-711dde34e4e5da954a58393e1a177e8c6969b8b5.tar.bz2 opensim-SC_OLD-711dde34e4e5da954a58393e1a177e8c6969b8b5.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs | 33 |
1 files changed, 33 insertions, 0 deletions
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 | } | ||