* refactor: Call StatsReporter methods directly rather than through Scene (as WebStatsModule was doing)

* Assume that StatsReporter is always present (possibly as a no-op impl) rather than doing null checks
This commit is contained in:
Justin Clarke Casey
2009-04-03 17:14:51 +00:00
parent 7322e19212
commit 5146cb7a72
5 changed files with 26 additions and 44 deletions

View File

@@ -1970,12 +1970,11 @@ namespace OpenSim.Region.Framework.Scenes
client.OnUnackedTerrain += TerrainUnAcked;
client.OnObjectOwner += ObjectOwner;
IGodsModule godsModule = RequestModuleInterface<IGodsModule>();
IGodsModule godsModule = RequestModuleInterface<IGodsModule>();
client.OnGodKickUser += godsModule.KickUser;
client.OnRequestGodlikePowers += godsModule.RequestGodlikePowers;
if (StatsReporter != null)
client.OnNetworkStatsUpdate += StatsReporter.AddPacketsFromClientStats;
client.OnNetworkStatsUpdate += StatsReporter.AddPacketsStats;
// EventManager.TriggerOnNewClient(client);
}
@@ -2793,29 +2792,6 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID);
}
public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes)
{
StatsReporter.AddInPackets(inPackets);
StatsReporter.AddOutPackets(outPackets);
StatsReporter.AddunAckedBytes(unAckedBytes);
}
public void AddAgentTime(int ms)
{
StatsReporter.addFrameMS(ms);
StatsReporter.addAgentMS(ms);
}
public void AddAgentUpdates(int count)
{
StatsReporter.AddAgentUpdates(count);
}
public void AddPendingDownloads(int count)
{
StatsReporter.addPendingDownload(count);
}
#endregion
public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set)