aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie2011-10-12 01:42:39 +0100
committerMelanie2011-10-12 01:42:39 +0100
commit4e88fe42e4b5da8702f61a74bddd59865c7bd32f (patch)
tree7e14136b1e604ff138a28496ff5373160a58fe91 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge commit '7fa1c979cf60a981200c4ddc3ea0ff8d0ddb2aa7' into bigmerge (diff)
parentInstead of adding stat agentMS in all kinds of places, calculate it instead i... (diff)
downloadopensim-SC_OLD-4e88fe42e4b5da8702f61a74bddd59865c7bd32f.zip
opensim-SC_OLD-4e88fe42e4b5da8702f61a74bddd59865c7bd32f.tar.gz
opensim-SC_OLD-4e88fe42e4b5da8702f61a74bddd59865c7bd32f.tar.bz2
opensim-SC_OLD-4e88fe42e4b5da8702f61a74bddd59865c7bd32f.tar.xz
Merge commit 'ca83f99332316fda1c412a5bf2889f9cf5cf3577' into bigmerge
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-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 1acd607..cd4b14d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -186,6 +186,7 @@ namespace OpenSim.Region.Framework.Scenes
186 private int m_update_land = 10; 186 private int m_update_land = 10;
187 private int m_update_coarse_locations = 50; 187 private int m_update_coarse_locations = 50;
188 188
189 private int agentMS;
189 private int frameMS; 190 private int frameMS;
190 private int physicsMS2; 191 private int physicsMS2;
191 private int physicsMS; 192 private int physicsMS;
@@ -1251,12 +1252,15 @@ namespace OpenSim.Region.Framework.Scenes
1251 1252
1252 int maintc = Util.EnvironmentTickCount(); 1253 int maintc = Util.EnvironmentTickCount();
1253 int tmpFrameMS = maintc; 1254 int tmpFrameMS = maintc;
1254 tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0; 1255 agentMS = tempOnRezMS = eventMS = backupMS = terrainMS = landMS = 0;
1255 1256
1257 // TODO: ADD AGENT TIME HERE
1256 // Increment the frame counter 1258 // Increment the frame counter
1257 ++Frame; 1259 ++Frame;
1258 try 1260 try
1259 { 1261 {
1262 int tmpAgentMS = Util.EnvironmentTickCount();
1263
1260 // Check if any objects have reached their targets 1264 // Check if any objects have reached their targets
1261 CheckAtTargets(); 1265 CheckAtTargets();
1262 1266
@@ -1283,6 +1287,8 @@ namespace OpenSim.Region.Framework.Scenes
1283 }); 1287 });
1284 } 1288 }
1285 1289
1290 agentMS = Util.EnvironmentTickCountSubtract(tmpAgentMS);
1291
1286 int tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1292 int tmpPhysicsMS2 = Util.EnvironmentTickCount();
1287 if ((Frame % m_update_physics == 0) && m_physics_enabled) 1293 if ((Frame % m_update_physics == 0) && m_physics_enabled)
1288 m_sceneGraph.UpdatePreparePhysics(); 1294 m_sceneGraph.UpdatePreparePhysics();
@@ -1290,7 +1296,11 @@ namespace OpenSim.Region.Framework.Scenes
1290 1296
1291 // Apply any pending avatar force input to the avatar's velocity 1297 // Apply any pending avatar force input to the avatar's velocity
1292 if (Frame % m_update_entitymovement == 0) 1298 if (Frame % m_update_entitymovement == 0)
1299 {
1300 tmpAgentMS = Util.EnvironmentTickCount();
1293 m_sceneGraph.UpdateScenePresenceMovement(); 1301 m_sceneGraph.UpdateScenePresenceMovement();
1302 agentMS += Util.EnvironmentTickCountSubtract(tmpAgentMS);
1303 }
1294 1304
1295 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their 1305 // Perform the main physics update. This will do the actual work of moving objects and avatars according to their
1296 // velocity 1306 // velocity
@@ -1362,6 +1372,7 @@ namespace OpenSim.Region.Framework.Scenes
1362 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); 1372 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
1363 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); 1373 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
1364 StatsReporter.addFrameMS(frameMS); 1374 StatsReporter.addFrameMS(frameMS);
1375 StatsReporter.addAgentMS(agentMS);
1365 StatsReporter.addPhysicsMS(physicsMS + physicsMS2); 1376 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
1366 StatsReporter.addOtherMS(otherMS); 1377 StatsReporter.addOtherMS(otherMS);
1367 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); 1378 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());