Convert getLastReportedSimFPS() and getLastReportedSimStats() into more idiomatic LastReportedSimFPS and LastReportedSimStats on SimStatsReporter
parent
8114f895c2
commit
19096bd391
|
@ -78,6 +78,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UnAckedBytes = 24,
|
UnAckedBytes = 24,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This is for llGetRegionFPS
|
||||||
|
/// </summary>
|
||||||
|
public float LastReportedSimFPS
|
||||||
|
{
|
||||||
|
get { return lastReportedSimFPS; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public float[] LastReportedSimStats
|
||||||
|
{
|
||||||
|
get { return lastReportedSimStats; }
|
||||||
|
}
|
||||||
|
|
||||||
// Sending a stats update every 3 seconds-
|
// Sending a stats update every 3 seconds-
|
||||||
private int statsUpdatesEveryMS = 3000;
|
private int statsUpdatesEveryMS = 3000;
|
||||||
private float statsUpdateFactor = 0;
|
private float statsUpdateFactor = 0;
|
||||||
|
@ -437,19 +450,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_activeScripts = count;
|
m_activeScripts = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This is for llGetRegionFPS
|
|
||||||
/// </summary>
|
|
||||||
public float getLastReportedSimFPS()
|
|
||||||
{
|
|
||||||
return lastReportedSimFPS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float[] getLastReportedSimStats()
|
|
||||||
{
|
|
||||||
return lastReportedSimStats;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
|
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
|
||||||
{
|
{
|
||||||
AddInPackets(inPackets);
|
AddInPackets(inPackets);
|
||||||
|
|
|
@ -5925,7 +5925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Float llGetRegionFPS()
|
public LSL_Float llGetRegionFPS()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
return World.StatsReporter.getLastReportedSimFPS();
|
return World.StatsReporter.LastReportedSimFPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2462,7 +2462,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
|
CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LSL_List ret = new LSL_List();
|
LSL_List ret = new LSL_List();
|
||||||
float[] stats = World.StatsReporter.getLastReportedSimStats();
|
float[] stats = World.StatsReporter.LastReportedSimStats;
|
||||||
|
|
||||||
for (int i = 0; i < 21; i++)
|
for (int i = 0; i < 21; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue