From 5146cb7a72d7f41dd9a3c022b48a75138259d977 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 3 Apr 2009 17:14:51 +0000 Subject: * 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 --- OpenSim/Region/Framework/Scenes/Scene.cs | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c9e13ac..5f68ccb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1970,12 +1970,11 @@ namespace OpenSim.Region.Framework.Scenes client.OnUnackedTerrain += TerrainUnAcked; client.OnObjectOwner += ObjectOwner; - IGodsModule godsModule = RequestModuleInterface(); + IGodsModule godsModule = RequestModuleInterface(); 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) -- cgit v1.1