Merge branch 'master' into careminster

avinationmerge
Melanie 2012-03-20 23:59:49 +00:00
commit 80a3b43e69
1 changed files with 14 additions and 7 deletions

View File

@ -193,7 +193,11 @@ namespace OpenSim.Region.Framework.Scenes
private int backupMS; private int backupMS;
private int terrainMS; private int terrainMS;
private int landMS; private int landMS;
private int lastCompletedFrame;
/// <summary>
/// Tick at which the last frame was processed.
/// </summary>
private int m_lastFrameTick;
public bool CombineRegions = false; public bool CombineRegions = false;
/// <summary> /// <summary>
@ -484,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes
public int MonitorBackupTime { get { return backupMS; } } public int MonitorBackupTime { get { return backupMS; } }
public int MonitorTerrainTime { get { return terrainMS; } } public int MonitorTerrainTime { get { return terrainMS; } }
public int MonitorLandTime { get { return landMS; } } public int MonitorLandTime { get { return landMS; } }
public int MonitorLastFrameTick { get { return lastCompletedFrame; } } public int MonitorLastFrameTick { get { return m_lastFrameTick; } }
public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } } public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } }
public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } } public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } }
@ -1250,6 +1254,7 @@ namespace OpenSim.Region.Framework.Scenes
float physicsFPS = 0f; float physicsFPS = 0f;
int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS; int tmpPhysicsMS, tmpPhysicsMS2, tmpAgentMS, tmpTempOnRezMS, evMS, backMS, terMS;
int previousFrameTick;
int maintc; int maintc;
List<Vector3> coarseLocations; List<Vector3> coarseLocations;
List<UUID> avatarUUIDs; List<UUID> avatarUUIDs;
@ -1353,10 +1358,9 @@ namespace OpenSim.Region.Framework.Scenes
// UpdateLand(); // UpdateLand();
// landMS = Util.EnvironmentTickCountSubtract(ldMS); // landMS = Util.EnvironmentTickCountSubtract(ldMS);
//} //}
frameMS = Util.EnvironmentTickCountSubtract(maintc); frameMS = Util.EnvironmentTickCountSubtract(maintc);
otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS; otherMS = tempOnRezMS + eventMS + backupMS + terrainMS + landMS;
lastCompletedFrame = Util.EnvironmentTickCount();
// if (Frame%m_update_avatars == 0) // if (Frame%m_update_avatars == 0)
// UpdateInWorldTime(); // UpdateInWorldTime();
@ -1426,7 +1430,9 @@ namespace OpenSim.Region.Framework.Scenes
// Tell the watchdog that this thread is still alive // Tell the watchdog that this thread is still alive
Watchdog.UpdateThread(); Watchdog.UpdateThread();
maintc = Util.EnvironmentTickCountSubtract(maintc); // previousFrameTick = m_lastFrameTick;
m_lastFrameTick = Util.EnvironmentTickCount();
maintc = Util.EnvironmentTickCountSubtract(m_lastFrameTick, maintc);
maintc = (int)(MinFrameTime * 1000) - maintc; maintc = (int)(MinFrameTime * 1000) - maintc;
m_lastUpdate = Util.EnvironmentTickCount(); m_lastUpdate = Util.EnvironmentTickCount();
@ -1435,10 +1441,11 @@ namespace OpenSim.Region.Framework.Scenes
if (maintc > 0) if (maintc > 0)
Thread.Sleep(maintc); Thread.Sleep(maintc);
// if (frameMS > (int)(MinFrameTime * 1000)) // Optionally warn if a frame takes double the amount of time that it should.
// if (Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick) > (int)(MinFrameTime * 1000 * 2))
// m_log.WarnFormat( // m_log.WarnFormat(
// "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}", // "[SCENE]: Frame took {0} ms (desired max {1} ms) in {2}",
// frameMS, // Util.EnvironmentTickCountSubtract(m_lastFrameTick, previousFrameTick),
// MinFrameTime * 1000, // MinFrameTime * 1000,
// RegionInfo.RegionName); // RegionInfo.RegionName);
} }