diff options
author | Justin Clark-Casey (justincc) | 2011-10-10 23:48:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-10 23:48:53 +0100 |
commit | 62aad4c18f1ebc0780ce47cf179f3d5550ff0837 (patch) | |
tree | c238bbc4d994b7577fa93a25fdbde5f9df2caac6 | |
parent | Convert getLastReportedSimFPS() and getLastReportedSimStats() into more idiom... (diff) | |
download | opensim-SC_OLD-62aad4c18f1ebc0780ce47cf179f3d5550ff0837.zip opensim-SC_OLD-62aad4c18f1ebc0780ce47cf179f3d5550ff0837.tar.gz opensim-SC_OLD-62aad4c18f1ebc0780ce47cf179f3d5550ff0837.tar.bz2 opensim-SC_OLD-62aad4c18f1ebc0780ce47cf179f3d5550ff0837.tar.xz |
Add other region stats (total frame time, physics fps, etc.) currently missing from MonitorModule
Unlike the other 3 stats mechanisms, monitor data can be queried per individual region, which makes this useful.
This doesn't affect an of the existing monitored stats.
16 files changed, 326 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs index 9f618cc..72c7a4a 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs | |||
@@ -29,8 +29,31 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
29 | { | 29 | { |
30 | interface IMonitor | 30 | interface IMonitor |
31 | { | 31 | { |
32 | double GetValue(); | 32 | /// <summary> |
33 | /// Name of the monitor. | ||
34 | /// </summary> | ||
35 | /// <remarks> | ||
36 | /// This is the name used in XML. | ||
37 | /// </remarks> | ||
38 | /// <returns></returns> | ||
33 | string GetName(); | 39 | string GetName(); |
34 | string GetFriendlyValue(); // Convert to readable numbers | 40 | |
41 | /// <summary> | ||
42 | /// Value of this monitor | ||
43 | /// </summary> | ||
44 | /// <returns></returns> | ||
45 | double GetValue(); | ||
46 | |||
47 | /// <summary> | ||
48 | /// Human-readable name of the monitor | ||
49 | /// </summary> | ||
50 | /// <returns></returns> | ||
51 | string GetFriendlyName(); | ||
52 | |||
53 | /// <summary> | ||
54 | /// Human readable value. | ||
55 | /// </summary> | ||
56 | /// <returns></returns> | ||
57 | string GetFriendlyValue(); | ||
35 | } | 58 | } |
36 | } | 59 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index 057ed6f..a9dc1fe 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | |||
@@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
82 | { | 82 | { |
83 | foreach (IMonitor monitor in m_monitors) | 83 | foreach (IMonitor monitor in m_monitors) |
84 | { | 84 | { |
85 | m_log.Info("[MonitorModule]: " + m_scene.RegionInfo.RegionName + " reports " + monitor.GetName() + " = " + monitor.GetFriendlyValue()); | 85 | m_log.Info("[MonitorModule]: " + m_scene.RegionInfo.RegionName + " reports " + monitor.GetFriendlyName() + " = " + monitor.GetFriendlyValue()); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
@@ -132,11 +132,9 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
132 | string xml = "<data>"; | 132 | string xml = "<data>"; |
133 | foreach (IMonitor monitor in m_monitors) | 133 | foreach (IMonitor monitor in m_monitors) |
134 | { | 134 | { |
135 | string elemName = monitor.ToString(); | 135 | string elemName = monitor.GetName(); |
136 | if (elemName.StartsWith(monitor.GetType().Namespace)) | 136 | xml += "<" + elemName + ">" + monitor.GetValue().ToString() + "</" + elemName + ">"; |
137 | elemName = elemName.Substring(monitor.GetType().Namespace.Length + 1); | 137 | // m_log.DebugFormat("[MONITOR MODULE]: {0} = {1}", elemName, monitor.GetValue()); |
138 | |||
139 | xml += "<" + elemName + ">" + monitor.GetValue() + "</" + elemName + ">"; | ||
140 | } | 138 | } |
141 | xml += "</data>"; | 139 | xml += "</data>"; |
142 | 140 | ||
@@ -166,6 +164,150 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
166 | m_monitors.Add(new EventFrameMonitor(m_scene)); | 164 | m_monitors.Add(new EventFrameMonitor(m_scene)); |
167 | m_monitors.Add(new LandFrameMonitor(m_scene)); | 165 | m_monitors.Add(new LandFrameMonitor(m_scene)); |
168 | m_monitors.Add(new LastFrameTimeMonitor(m_scene)); | 166 | m_monitors.Add(new LastFrameTimeMonitor(m_scene)); |
167 | |||
168 | m_monitors.Add( | ||
169 | new GenericMonitor( | ||
170 | m_scene, | ||
171 | "TimeDilationMonitor", | ||
172 | "Time Dilation", | ||
173 | m => m.Scene.StatsReporter.LastReportedSimStats[0], | ||
174 | m => m.GetValue().ToString())); | ||
175 | |||
176 | m_monitors.Add( | ||
177 | new GenericMonitor( | ||
178 | m_scene, | ||
179 | "SimFPSMonitor", | ||
180 | "Sim FPS", | ||
181 | m => m.Scene.StatsReporter.LastReportedSimStats[1], | ||
182 | m => string.Format("{0}", m.GetValue()))); | ||
183 | |||
184 | m_monitors.Add( | ||
185 | new GenericMonitor( | ||
186 | m_scene, | ||
187 | "PhysicsFPSMonitor", | ||
188 | "Physics FPS", | ||
189 | m => m.Scene.StatsReporter.LastReportedSimStats[2], | ||
190 | m => string.Format("{0}", m.GetValue()))); | ||
191 | |||
192 | m_monitors.Add( | ||
193 | new GenericMonitor( | ||
194 | m_scene, | ||
195 | "AgentUpdatesPerSecondMonitor", | ||
196 | "Agent Updates", | ||
197 | m => m.Scene.StatsReporter.LastReportedSimStats[3], | ||
198 | m => string.Format("{0} per second", m.GetValue()))); | ||
199 | |||
200 | m_monitors.Add( | ||
201 | new GenericMonitor( | ||
202 | m_scene, | ||
203 | "ActiveObjectCountMonitor", | ||
204 | "Active Objects", | ||
205 | m => m.Scene.StatsReporter.LastReportedSimStats[7], | ||
206 | m => string.Format("{0}", m.GetValue()))); | ||
207 | |||
208 | m_monitors.Add( | ||
209 | new GenericMonitor( | ||
210 | m_scene, | ||
211 | "ActiveScriptsMonitor", | ||
212 | "Active Scripts", | ||
213 | m => m.Scene.StatsReporter.LastReportedSimStats[19], | ||
214 | m => string.Format("{0}", m.GetValue()))); | ||
215 | |||
216 | m_monitors.Add( | ||
217 | new GenericMonitor( | ||
218 | m_scene, | ||
219 | "ScriptEventsPerSecondMonitor", | ||
220 | "Script Events", | ||
221 | m => m.Scene.StatsReporter.LastReportedSimStats[20], | ||
222 | m => string.Format("{0} per second", m.GetValue()))); | ||
223 | |||
224 | m_monitors.Add( | ||
225 | new GenericMonitor( | ||
226 | m_scene, | ||
227 | "InPacketsPerSecondMonitor", | ||
228 | "In Packets", | ||
229 | m => m.Scene.StatsReporter.LastReportedSimStats[13], | ||
230 | m => string.Format("{0} per second", m.GetValue()))); | ||
231 | |||
232 | m_monitors.Add( | ||
233 | new GenericMonitor( | ||
234 | m_scene, | ||
235 | "OutPacketsPerSecondMonitor", | ||
236 | "Out Packets", | ||
237 | m => m.Scene.StatsReporter.LastReportedSimStats[14], | ||
238 | m => string.Format("{0} per second", m.GetValue()))); | ||
239 | |||
240 | m_monitors.Add( | ||
241 | new GenericMonitor( | ||
242 | m_scene, | ||
243 | "UnackedBytesMonitor", | ||
244 | "Unacked Bytes", | ||
245 | m => m.Scene.StatsReporter.LastReportedSimStats[15], | ||
246 | m => string.Format("{0}", m.GetValue()))); | ||
247 | |||
248 | m_monitors.Add( | ||
249 | new GenericMonitor( | ||
250 | m_scene, | ||
251 | "PendingDownloadsMonitor", | ||
252 | "Pending Downloads", | ||
253 | m => m.Scene.StatsReporter.LastReportedSimStats[17], | ||
254 | m => string.Format("{0}", m.GetValue()))); | ||
255 | |||
256 | m_monitors.Add( | ||
257 | new GenericMonitor( | ||
258 | m_scene, | ||
259 | "PendingUploadsMonitor", | ||
260 | "Pending Uploads", | ||
261 | m => m.Scene.StatsReporter.LastReportedSimStats[18], | ||
262 | m => string.Format("{0}", m.GetValue()))); | ||
263 | |||
264 | m_monitors.Add( | ||
265 | new GenericMonitor( | ||
266 | m_scene, | ||
267 | "TotalFrameTimeMonitor", | ||
268 | "Total Frame Time", | ||
269 | m => m.Scene.StatsReporter.LastReportedSimStats[8], | ||
270 | m => string.Format("{0} ms", m.GetValue()))); | ||
271 | |||
272 | m_monitors.Add( | ||
273 | new GenericMonitor( | ||
274 | m_scene, | ||
275 | "NetFrameTimeMonitor", | ||
276 | "Net Frame Time", | ||
277 | m => m.Scene.StatsReporter.LastReportedSimStats[9], | ||
278 | m => string.Format("{0} ms", m.GetValue()))); | ||
279 | |||
280 | m_monitors.Add( | ||
281 | new GenericMonitor( | ||
282 | m_scene, | ||
283 | "PhysicsFrameTimeMonitor", | ||
284 | "Physics Frame Time", | ||
285 | m => m.Scene.StatsReporter.LastReportedSimStats[10], | ||
286 | m => string.Format("{0} ms", m.GetValue()))); | ||
287 | |||
288 | m_monitors.Add( | ||
289 | new GenericMonitor( | ||
290 | m_scene, | ||
291 | "SimulationFrameTimeMonitor", | ||
292 | "Simulation Frame Time", | ||
293 | m => m.Scene.StatsReporter.LastReportedSimStats[12], | ||
294 | m => string.Format("{0} ms", m.GetValue()))); | ||
295 | |||
296 | m_monitors.Add( | ||
297 | new GenericMonitor( | ||
298 | m_scene, | ||
299 | "AgentFrameTimeMonitor", | ||
300 | "Agent Frame Time", | ||
301 | m => m.Scene.StatsReporter.LastReportedSimStats[16], | ||
302 | m => string.Format("{0} ms", m.GetValue()))); | ||
303 | |||
304 | m_monitors.Add( | ||
305 | new GenericMonitor( | ||
306 | m_scene, | ||
307 | "ImagesFrameTimeMonitor", | ||
308 | "Images Frame Time", | ||
309 | m => m.Scene.StatsReporter.LastReportedSimStats[11], | ||
310 | m => string.Format("{0} ms", m.GetValue()))); | ||
169 | 311 | ||
170 | m_alerts.Add(new DeadlockAlert(m_monitors.Find(x => x is LastFrameTimeMonitor) as LastFrameTimeMonitor)); | 312 | m_alerts.Add(new DeadlockAlert(m_monitors.Find(x => x is LastFrameTimeMonitor) as LastFrameTimeMonitor)); |
171 | 313 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs index 4a2029e..3fb5e3a 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "AgentCountMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.SceneGraph.GetRootAgentCount(); | 50 | return m_scene.SceneGraph.GetRootAgentCount(); |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Root Agent Count"; | 55 | return "Root Agent Count"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs index 4ab3edd..be0e8fb 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "ChildAgentCountMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.SceneGraph.GetChildAgentCount(); | 50 | return m_scene.SceneGraph.GetChildAgentCount(); |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Child Agent Count"; | 55 | return "Child Agent Count"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs index 356458d..1c44c78 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "EventFrameMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.MonitorEventTime; | 50 | return m_scene.MonitorEventTime; |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Total Event Frame Time"; | 55 | return "Total Event Frame Time"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs index aa2e9c0..3f4d4a2 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs | |||
@@ -33,12 +33,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
33 | { | 33 | { |
34 | #region Implementation of IMonitor | 34 | #region Implementation of IMonitor |
35 | 35 | ||
36 | public string GetName() | ||
37 | { | ||
38 | return "GCMemoryMonitor"; | ||
39 | } | ||
40 | |||
36 | public double GetValue() | 41 | public double GetValue() |
37 | { | 42 | { |
38 | return GC.GetTotalMemory(false); | 43 | return GC.GetTotalMemory(false); |
39 | } | 44 | } |
40 | 45 | ||
41 | public string GetName() | 46 | public string GetFriendlyName() |
42 | { | 47 | { |
43 | return "GC Reported Memory"; | 48 | return "GC Reported Memory"; |
44 | } | 49 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GenericMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GenericMonitor.cs new file mode 100644 index 0000000..551c49c --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GenericMonitor.cs | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using OpenSim.Region.Framework.Scenes; | ||
30 | |||
31 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
32 | { | ||
33 | class GenericMonitor : IMonitor | ||
34 | { | ||
35 | public Scene Scene { get; private set; } | ||
36 | public string Name { get; private set; } | ||
37 | public string FriendlyName { get; private set; } | ||
38 | |||
39 | private readonly Func<GenericMonitor, double> m_getValueAction; | ||
40 | private readonly Func<GenericMonitor, string> m_getFriendlyValueAction; | ||
41 | |||
42 | public GenericMonitor( | ||
43 | Scene scene, | ||
44 | string name, | ||
45 | string friendlyName, | ||
46 | Func<GenericMonitor, double> getValueAction, | ||
47 | Func<GenericMonitor, string> getFriendlyValueAction) | ||
48 | { | ||
49 | Scene = scene; | ||
50 | Name = name; | ||
51 | FriendlyName = name; | ||
52 | m_getFriendlyValueAction = getFriendlyValueAction; | ||
53 | m_getValueAction = getValueAction; | ||
54 | } | ||
55 | |||
56 | public double GetValue() | ||
57 | { | ||
58 | return m_getValueAction(this); | ||
59 | } | ||
60 | |||
61 | public string GetName() | ||
62 | { | ||
63 | return Name; | ||
64 | } | ||
65 | |||
66 | public string GetFriendlyName() | ||
67 | { | ||
68 | return FriendlyName; | ||
69 | } | ||
70 | |||
71 | public string GetFriendlyValue() | ||
72 | { | ||
73 | return m_getFriendlyValueAction(this); | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | |||
78 | |||
79 | |||
80 | |||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs index e1c36de..262735e 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "LandFrameMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.MonitorLandTime; | 50 | return m_scene.MonitorLandTime; |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Land Frame Time"; | 55 | return "Land Frame Time"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs index f21a3ae..3acb4ad 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs | |||
@@ -41,12 +41,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
41 | 41 | ||
42 | #region Implementation of IMonitor | 42 | #region Implementation of IMonitor |
43 | 43 | ||
44 | public string GetName() | ||
45 | { | ||
46 | return "LastFrameTimeMonitor"; | ||
47 | } | ||
48 | |||
44 | public double GetValue() | 49 | public double GetValue() |
45 | { | 50 | { |
46 | return Environment.TickCount - m_scene.MonitorLastFrameTick; | 51 | return Environment.TickCount - m_scene.MonitorLastFrameTick; |
47 | } | 52 | } |
48 | 53 | ||
49 | public string GetName() | 54 | public string GetFriendlyName() |
50 | { | 55 | { |
51 | return "Last Completed Frame At"; | 56 | return "Last Completed Frame At"; |
52 | } | 57 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs index 10804f9..52a2df1 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "ObjectCountMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.SceneGraph.GetTotalObjectsCount(); | 50 | return m_scene.SceneGraph.GetTotalObjectsCount(); |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Total Objects Count"; | 55 | return "Total Objects Count"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs index 5f6190c..07c13d1 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs | |||
@@ -33,12 +33,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
33 | { | 33 | { |
34 | #region Implementation of IMonitor | 34 | #region Implementation of IMonitor |
35 | 35 | ||
36 | public string GetName() | ||
37 | { | ||
38 | return "PWSMemoryMonitor"; | ||
39 | } | ||
40 | |||
36 | public double GetValue() | 41 | public double GetValue() |
37 | { | 42 | { |
38 | return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64; | 43 | return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64; |
39 | } | 44 | } |
40 | 45 | ||
41 | public string GetName() | 46 | public string GetFriendlyName() |
42 | { | 47 | { |
43 | return "Private Working Set Memory"; | 48 | return "Private Working Set Memory"; |
44 | } | 49 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs index 7c5bb0a..b10fa75 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "PhysicsFrameMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.MonitorPhysicsSyncTime + m_scene.MonitorPhysicsUpdateTime; | 50 | return m_scene.MonitorPhysicsSyncTime + m_scene.MonitorPhysicsUpdateTime; |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Total Physics Frame Time"; | 55 | return "Total Physics Frame Time"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs index 1894b3b..a85d8cc 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "PhysicsUpdateFrameMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.MonitorPhysicsUpdateTime; | 50 | return m_scene.MonitorPhysicsUpdateTime; |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Physics Update Frame Time"; | 55 | return "Physics Update Frame Time"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs index 63ddf07..fcfe32a 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs | |||
@@ -32,12 +32,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
32 | { | 32 | { |
33 | #region Implementation of IMonitor | 33 | #region Implementation of IMonitor |
34 | 34 | ||
35 | public string GetName() | ||
36 | { | ||
37 | return "ThreadCountMonitor"; | ||
38 | } | ||
39 | |||
35 | public double GetValue() | 40 | public double GetValue() |
36 | { | 41 | { |
37 | return System.Diagnostics.Process.GetCurrentProcess().Threads.Count; | 42 | return System.Diagnostics.Process.GetCurrentProcess().Threads.Count; |
38 | } | 43 | } |
39 | 44 | ||
40 | public string GetName() | 45 | public string GetFriendlyName() |
41 | { | 46 | { |
42 | return "Total Threads"; | 47 | return "Total Threads"; |
43 | } | 48 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs index c3942bf..a46795d 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs | |||
@@ -40,12 +40,17 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | |||
40 | 40 | ||
41 | #region Implementation of IMonitor | 41 | #region Implementation of IMonitor |
42 | 42 | ||
43 | public string GetName() | ||
44 | { | ||
45 | return "TotalFrameMonitor"; | ||
46 | } | ||
47 | |||
43 | public double GetValue() | 48 | public double GetValue() |
44 | { | 49 | { |
45 | return m_scene.MonitorFrameTime; | 50 | return m_scene.MonitorFrameTime; |
46 | } | 51 | } |
47 | 52 | ||
48 | public string GetName() | 53 | public string GetFriendlyName() |
49 | { | 54 | { |
50 | return "Total Frame Time"; | 55 | return "Total Frame Time"; |
51 | } | 56 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index b9d38d0..8e1c8f0 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
52 | 52 | ||
53 | private YourStatsAreWrong handlerStatsIncorrect = null; | 53 | private YourStatsAreWrong handlerStatsIncorrect = null; |
54 | 54 | ||
55 | private enum Stats : uint | 55 | public enum Stats : uint |
56 | { | 56 | { |
57 | TimeDilation = 0, | 57 | TimeDilation = 0, |
58 | SimFPS = 1, | 58 | SimFPS = 1, |