aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2009-11-01 19:37:40 +1100
committerAdam Frisby2009-11-01 19:37:40 +1100
commit711dde34e4e5da954a58393e1a177e8c6969b8b5 (patch)
treea1411439bd3a5a897626d640dfd540bae26c9545
parentPatch + minor formatting fixes. (diff)
downloadopensim-SC-711dde34e4e5da954a58393e1a177e8c6969b8b5.zip
opensim-SC-711dde34e4e5da954a58393e1a177e8c6969b8b5.tar.gz
opensim-SC-711dde34e4e5da954a58393e1a177e8c6969b8b5.tar.bz2
opensim-SC-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.
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs70
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs26
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs26
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs25
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs33
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs59
14 files changed, 471 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
new file mode 100644
index 0000000..a51dccd
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
@@ -0,0 +1,9 @@
1namespace OpenSim.Region.CoreModules.Framework.Monitoring
2{
3 interface IMonitor
4 {
5 double GetValue();
6 string GetName();
7 string GetFriendlyValue(); // Convert to readable numbers
8 }
9}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
new file mode 100644
index 0000000..d4a7692
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -0,0 +1,70 @@
1using System.Collections.Generic;
2using System.Reflection;
3using log4net;
4using Nini.Config;
5using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors;
6using OpenSim.Region.Framework.Interfaces;
7using OpenSim.Region.Framework.Scenes;
8
9namespace OpenSim.Region.CoreModules.Framework.Monitoring
10{
11 public class MonitorModule : IRegionModule
12 {
13 private Scene m_scene;
14 private readonly List<IMonitor> m_monitors = new List<IMonitor>();
15 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
16
17 public void DebugMonitors(string module, string[] args)
18 {
19 foreach (IMonitor monitor in m_monitors)
20 {
21 m_log.Info("[MonitorModule] " + m_scene.RegionInfo.RegionName + " reports " + monitor.GetName() + " = " + monitor.GetValue());
22 }
23 }
24
25 #region Implementation of IRegionModule
26
27 public void Initialise(Scene scene, IConfigSource source)
28 {
29 m_scene = scene;
30
31
32 m_scene.AddCommand(this, "monitor report",
33 "monitor report",
34 "Returns a variety of statistics about the current region and/or simulator",
35 DebugMonitors);
36 }
37
38 public void PostInitialise()
39 {
40 m_monitors.Add(new AgentCountMonitor(m_scene));
41 m_monitors.Add(new ChildAgentCountMonitor(m_scene));
42 m_monitors.Add(new GCMemoryMonitor());
43 m_monitors.Add(new ObjectCountMonitor(m_scene));
44 m_monitors.Add(new PhysicsFrameMonitor(m_scene));
45 m_monitors.Add(new PhysicsUpdateFrameMonitor(m_scene));
46 m_monitors.Add(new PWSMemoryMonitor());
47 m_monitors.Add(new ThreadCountMonitor());
48 m_monitors.Add(new TotalFrameMonitor(m_scene));
49 m_monitors.Add(new EventFrameMonitor(m_scene));
50 m_monitors.Add(new LandFrameMonitor(m_scene));
51 }
52
53 public void Close()
54 {
55
56 }
57
58 public string Name
59 {
60 get { return "Region Health Monitoring Module"; }
61 }
62
63 public bool IsSharedModule
64 {
65 get { return false; }
66 }
67
68 #endregion
69 }
70}
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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using System;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using System;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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
2namespace 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 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace 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}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 78ccb55..07fdc9f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -274,6 +274,21 @@ namespace OpenSim.Region.Framework.Scenes
274 private int physicsMS2; 274 private int physicsMS2;
275 private int physicsMS; 275 private int physicsMS;
276 private int otherMS; 276 private int otherMS;
277 private int tempOnRezMS;
278 private int eventMS;
279 private int backupMS;
280 private int terrainMS;
281 private int landMS;
282
283 public int MonitorFrameTime { get { return frameMS; } }
284 public int MonitorPhysicsUpdateTime { get { return physicsMS; } }
285 public int MonitorPhysicsSyncTime { get { return physicsMS2; } }
286 public int MonitorOtherTime { get { return otherMS; } }
287 public int MonitorTempOnRezTime { get { return tempOnRezMS; } }
288 public int MonitorEventTime { get { return eventMS; } } // This may need to be divided into each event?
289 public int MonitorBackupTime { get { return backupMS; } }
290 public int MonitorTerrainTime { get { return terrainMS; } }
291 public int MonitorLandTime { get { return landMS; } }
277 292
278 private bool m_physics_enabled = true; 293 private bool m_physics_enabled = true;
279 private bool m_scripts_enabled = true; 294 private bool m_scripts_enabled = true;
@@ -1026,7 +1041,8 @@ namespace OpenSim.Region.Framework.Scenes
1026 TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate; 1041 TimeSpan SinceLastFrame = DateTime.UtcNow - m_lastupdate;
1027 physicsFPS = 0f; 1042 physicsFPS = 0f;
1028 1043
1029 maintc = maintc = frameMS = otherMS = Environment.TickCount; 1044 maintc = maintc = otherMS = Environment.TickCount;
1045 int tmpFrameMS = maintc;
1030 1046
1031 // Increment the frame counter 1047 // Increment the frame counter
1032 ++m_frame; 1048 ++m_frame;
@@ -1046,15 +1062,16 @@ namespace OpenSim.Region.Framework.Scenes
1046 if (m_frame % m_update_presences == 0) 1062 if (m_frame % m_update_presences == 0)
1047 m_sceneGraph.UpdatePresences(); 1063 m_sceneGraph.UpdatePresences();
1048 1064
1049 physicsMS2 = Environment.TickCount; 1065 int TempPhysicsMS2 = Environment.TickCount;
1050 if ((m_frame % m_update_physics == 0) && m_physics_enabled) 1066 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
1051 m_sceneGraph.UpdatePreparePhysics(); 1067 m_sceneGraph.UpdatePreparePhysics();
1052 physicsMS2 = Environment.TickCount - physicsMS2; 1068 TempPhysicsMS2 = Environment.TickCount - TempPhysicsMS2;
1069 physicsMS2 = TempPhysicsMS2;
1053 1070
1054 if (m_frame % m_update_entitymovement == 0) 1071 if (m_frame % m_update_entitymovement == 0)
1055 m_sceneGraph.UpdateScenePresenceMovement(); 1072 m_sceneGraph.UpdateScenePresenceMovement();
1056 1073
1057 physicsMS = Environment.TickCount; 1074 int TempPhysicsMS = Environment.TickCount;
1058 if (m_frame % m_update_physics == 0) 1075 if (m_frame % m_update_physics == 0)
1059 { 1076 {
1060 if (m_physics_enabled) 1077 if (m_physics_enabled)
@@ -1062,30 +1079,56 @@ namespace OpenSim.Region.Framework.Scenes
1062 if (SynchronizeScene != null) 1079 if (SynchronizeScene != null)
1063 SynchronizeScene(this); 1080 SynchronizeScene(this);
1064 } 1081 }
1065 physicsMS = Environment.TickCount - physicsMS; 1082 TempPhysicsMS = Environment.TickCount - TempPhysicsMS;
1066 physicsMS += physicsMS2; 1083 physicsMS = TempPhysicsMS;
1067 1084
1068 // Delete temp-on-rez stuff 1085 // Delete temp-on-rez stuff
1069 if (m_frame % m_update_backup == 0) 1086 if (m_frame % m_update_backup == 0)
1087 {
1088 int tozMS = Environment.TickCount;
1070 CleanTempObjects(); 1089 CleanTempObjects();
1090 tozMS -= Environment.TickCount;
1091 tempOnRezMS = tozMS;
1092 }
1071 1093
1072 if (RegionStatus != RegionStatus.SlaveScene) 1094 if (RegionStatus != RegionStatus.SlaveScene)
1073 { 1095 {
1074 if (m_frame % m_update_events == 0) 1096 if (m_frame % m_update_events == 0)
1097 {
1098 int evMS = Environment.TickCount;
1075 UpdateEvents(); 1099 UpdateEvents();
1100 evMS -= Environment.TickCount;
1101 eventMS = evMS;
1102 }
1076 1103
1077 if (m_frame % m_update_backup == 0) 1104 if (m_frame % m_update_backup == 0)
1105 {
1106 int backMS = Environment.TickCount;
1078 UpdateStorageBackup(); 1107 UpdateStorageBackup();
1108 backMS -= Environment.TickCount;
1109 backupMS = backMS;
1110 }
1079 1111
1080 if (m_frame % m_update_terrain == 0) 1112 if (m_frame % m_update_terrain == 0)
1113 {
1114 int terMS = Environment.TickCount;
1081 UpdateTerrain(); 1115 UpdateTerrain();
1116 terMS -= Environment.TickCount;
1117 terrainMS = terMS;
1118 }
1082 1119
1083 if (m_frame % m_update_land == 0) 1120 if (m_frame % m_update_land == 0)
1121 {
1122 int ldMS = Environment.TickCount;
1084 UpdateLand(); 1123 UpdateLand();
1124 ldMS -= Environment.TickCount;
1125 landMS = ldMS;
1126 }
1085 1127
1086 int tickCount = Environment.TickCount; 1128 int tickCount = Environment.TickCount;
1087 otherMS = tickCount - otherMS; 1129 otherMS = tickCount - otherMS;
1088 frameMS = tickCount - frameMS; 1130 tmpFrameMS -= tickCount;
1131 frameMS = tmpFrameMS;
1089 1132
1090 // if (m_frame%m_update_avatars == 0) 1133 // if (m_frame%m_update_avatars == 0)
1091 // UpdateInWorldTime(); 1134 // UpdateInWorldTime();
@@ -1097,7 +1140,7 @@ namespace OpenSim.Region.Framework.Scenes
1097 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); 1140 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
1098 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); 1141 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
1099 StatsReporter.addFrameMS(frameMS); 1142 StatsReporter.addFrameMS(frameMS);
1100 StatsReporter.addPhysicsMS(physicsMS); 1143 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
1101 StatsReporter.addOtherMS(otherMS); 1144 StatsReporter.addOtherMS(otherMS);
1102 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); 1145 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
1103 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 1146 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());