aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index e4ebcff..b1755ac 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -183,6 +183,7 @@ namespace OpenSim.Region.Framework.Scenes
183// private int m_update_land = 1; 183// private int m_update_land = 1;
184 private int m_update_coarse_locations = 50; 184 private int m_update_coarse_locations = 50;
185 185
186 private int agentMS;
186 private int frameMS; 187 private int frameMS;
187 private int physicsMS2; 188 private int physicsMS2;
188 private int physicsMS; 189 private int physicsMS;
@@ -1226,12 +1227,15 @@ namespace OpenSim.Region.Framework.Scenes
1226 1227
1227 int maintc = Util.EnvironmentTickCount(); 1228 int maintc = Util.EnvironmentTickCount();
1228 int tmpFrameMS = maintc; 1229 int tmpFrameMS = maintc;
1229 tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0; 1230 agentMS = tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0;
1230 1231
1232 // TODO: ADD AGENT TIME HERE
1231 // Increment the frame counter 1233 // Increment the frame counter
1232 ++Frame; 1234 ++Frame;
1233 try 1235 try
1234 { 1236 {
1237 int tmpAgentMS = Util.EnvironmentTickCount();
1238
1235 // Check if any objects have reached their targets 1239 // Check if any objects have reached their targets
1236 CheckAtTargets(); 1240 CheckAtTargets();
1237 1241
@@ -1258,6 +1262,8 @@ namespace OpenSim.Region.Framework.Scenes
1258 }); 1262 });
1259 } 1263 }
1260 1264
1265 agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS);
1266
1261 int tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1267 int tmpPhysicsMS2 = Util.EnvironmentTickCount();
1262 if ((Frame % m_update_physics == 0) && m_physics_enabled) 1268 if ((Frame % m_update_physics == 0) && m_physics_enabled)
1263 m_sceneGraph.UpdatePreparePhysics(); 1269 m_sceneGraph.UpdatePreparePhysics();
@@ -1265,7 +1271,11 @@ namespace OpenSim.Region.Framework.Scenes
1265 1271
1266 // Apply any pending avatar force input to the avatar's velocity 1272 // Apply any pending avatar force input to the avatar's velocity
1267 if (Frame % m_update_entitymovement == 0) 1273 if (Frame % m_update_entitymovement == 0)
1274 {
1275 tmpAgentMS = Util.EnvironmentTickCount();
1268 m_sceneGraph.UpdateScenePresenceMovement(); 1276 m_sceneGraph.UpdateScenePresenceMovement();
1277 agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS);
1278 }
1269 1279
1270 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their 1280 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
1271 // velocity 1281 // velocity
@@ -1330,6 +1340,7 @@ namespace OpenSim.Region.Framework.Scenes
1330 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); 1340 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
1331 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); 1341 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
1332 StatsReporter.addFrameMS(frameMS); 1342 StatsReporter.addFrameMS(frameMS);
1343 StatsReporter.addAgentMS(agentMS);
1333 StatsReporter.addPhysicsMS(physicsMS + physicsMS2); 1344 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
1334 StatsReporter.addOtherMS(otherMS); 1345 StatsReporter.addOtherMS(otherMS);
1335 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); 1346 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());