Instead of updating sim stats root agent, child, objects and scripts accounts every single scene frame, update in the once every 3 seconds SimStatsReporter run
parent
6375db1533
commit
72219eae7d
|
@ -1462,10 +1462,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
StatsReporter.AddPhysicsFPS(physicsFPS);
|
StatsReporter.AddPhysicsFPS(physicsFPS);
|
||||||
StatsReporter.AddTimeDilation(TimeDilation);
|
StatsReporter.AddTimeDilation(TimeDilation);
|
||||||
StatsReporter.AddFPS(1);
|
StatsReporter.AddFPS(1);
|
||||||
StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
|
|
||||||
StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
|
|
||||||
StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
|
|
||||||
StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
|
|
||||||
|
|
||||||
// frameMS currently records work frame times, not total frame times (work + any required sleep to
|
// frameMS currently records work frame times, not total frame times (work + any required sleep to
|
||||||
// reach min frame time.
|
// reach min frame time.
|
||||||
|
@ -1474,7 +1470,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
StatsReporter.addAgentMS(agentMS);
|
StatsReporter.addAgentMS(agentMS);
|
||||||
StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
|
StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
|
||||||
StatsReporter.addOtherMS(otherMS);
|
StatsReporter.addOtherMS(otherMS);
|
||||||
StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
|
|
||||||
StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
|
StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
|
||||||
|
|
||||||
if (LoginsDisabled && Frame == 20)
|
if (LoginsDisabled && Frame == 20)
|
||||||
|
|
|
@ -207,6 +207,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_report.Close();
|
m_report.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the number of milliseconds between stat updates.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name='ms'></param>
|
||||||
public void SetUpdateMS(int ms)
|
public void SetUpdateMS(int ms)
|
||||||
{
|
{
|
||||||
statsUpdatesEveryMS = ms;
|
statsUpdatesEveryMS = ms;
|
||||||
|
@ -254,6 +258,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
physfps = 0;
|
physfps = 0;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
m_rootAgents = m_scene.SceneGraph.GetRootAgentCount();
|
||||||
|
m_childAgents = m_scene.SceneGraph.GetChildAgentCount();
|
||||||
|
m_numPrim = m_scene.SceneGraph.GetTotalObjectsCount();
|
||||||
|
m_activePrim = m_scene.SceneGraph.GetActiveObjectsCount();
|
||||||
|
m_activeScripts = m_scene.SceneGraph.GetActiveScriptsCount();
|
||||||
|
|
||||||
|
// FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
|
||||||
|
// so that stat numbers are always consistent.
|
||||||
|
CheckStatSanity();
|
||||||
|
|
||||||
//Our time dilation is 0.91 when we're running a full speed,
|
//Our time dilation is 0.91 when we're running a full speed,
|
||||||
// therefore to make sure we get an appropriate range,
|
// therefore to make sure we get an appropriate range,
|
||||||
|
@ -408,13 +422,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_timeDilation = td;
|
m_timeDilation = td;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRootAgents(int rootAgents)
|
|
||||||
{
|
|
||||||
m_rootAgents = rootAgents;
|
|
||||||
CheckStatSanity();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void CheckStatSanity()
|
internal void CheckStatSanity()
|
||||||
{
|
{
|
||||||
if (m_rootAgents < 0 || m_childAgents < 0)
|
if (m_rootAgents < 0 || m_childAgents < 0)
|
||||||
|
@ -431,22 +438,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetChildAgents(int childAgents)
|
|
||||||
{
|
|
||||||
m_childAgents = childAgents;
|
|
||||||
CheckStatSanity();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetObjects(int objects)
|
|
||||||
{
|
|
||||||
m_numPrim = objects;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetActiveObjects(int objects)
|
|
||||||
{
|
|
||||||
m_activePrim = objects;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddFPS(int frames)
|
public void AddFPS(int frames)
|
||||||
{
|
{
|
||||||
m_fps += frames;
|
m_fps += frames;
|
||||||
|
@ -528,11 +519,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_scriptLinesPerSecond += count;
|
m_scriptLinesPerSecond += count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetActiveScripts(int count)
|
|
||||||
{
|
|
||||||
m_activeScripts = count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
|
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
|
||||||
{
|
{
|
||||||
AddInPackets(inPackets);
|
AddInPackets(inPackets);
|
||||||
|
|
Loading…
Reference in New Issue