diff options
author | Justin Clarke Casey | 2009-04-03 17:14:51 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-03 17:14:51 +0000 |
commit | 5146cb7a72d7f41dd9a3c022b48a75138259d977 (patch) | |
tree | 0b1045b389dc49083cebf64798b80a7ea326cd42 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Added one more delegate to Caps, and a few guards, so that these objects can ... (diff) | |
download | opensim-SC-5146cb7a72d7f41dd9a3c022b48a75138259d977.zip opensim-SC-5146cb7a72d7f41dd9a3c022b48a75138259d977.tar.gz opensim-SC-5146cb7a72d7f41dd9a3c022b48a75138259d977.tar.bz2 opensim-SC-5146cb7a72d7f41dd9a3c022b48a75138259d977.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 28 |
1 files changed, 2 insertions, 26 deletions
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 | |||
1970 | client.OnUnackedTerrain += TerrainUnAcked; | 1970 | client.OnUnackedTerrain += TerrainUnAcked; |
1971 | client.OnObjectOwner += ObjectOwner; | 1971 | client.OnObjectOwner += ObjectOwner; |
1972 | 1972 | ||
1973 | IGodsModule godsModule = RequestModuleInterface<IGodsModule>(); | 1973 | IGodsModule godsModule = RequestModuleInterface<IGodsModule>(); |
1974 | client.OnGodKickUser += godsModule.KickUser; | 1974 | client.OnGodKickUser += godsModule.KickUser; |
1975 | client.OnRequestGodlikePowers += godsModule.RequestGodlikePowers; | 1975 | client.OnRequestGodlikePowers += godsModule.RequestGodlikePowers; |
1976 | 1976 | ||
1977 | if (StatsReporter != null) | 1977 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsStats; |
1978 | client.OnNetworkStatsUpdate += StatsReporter.AddPacketsFromClientStats; | ||
1979 | 1978 | ||
1980 | // EventManager.TriggerOnNewClient(client); | 1979 | // EventManager.TriggerOnNewClient(client); |
1981 | } | 1980 | } |
@@ -2793,29 +2792,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2793 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); | 2792 | m_sceneGridService.RemoveUserFriend(ownerID, ExfriendID); |
2794 | } | 2793 | } |
2795 | 2794 | ||
2796 | public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes) | ||
2797 | { | ||
2798 | StatsReporter.AddInPackets(inPackets); | ||
2799 | StatsReporter.AddOutPackets(outPackets); | ||
2800 | StatsReporter.AddunAckedBytes(unAckedBytes); | ||
2801 | } | ||
2802 | |||
2803 | public void AddAgentTime(int ms) | ||
2804 | { | ||
2805 | StatsReporter.addFrameMS(ms); | ||
2806 | StatsReporter.addAgentMS(ms); | ||
2807 | } | ||
2808 | |||
2809 | public void AddAgentUpdates(int count) | ||
2810 | { | ||
2811 | StatsReporter.AddAgentUpdates(count); | ||
2812 | } | ||
2813 | |||
2814 | public void AddPendingDownloads(int count) | ||
2815 | { | ||
2816 | StatsReporter.addPendingDownload(count); | ||
2817 | } | ||
2818 | |||
2819 | #endregion | 2795 | #endregion |
2820 | 2796 | ||
2821 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) | 2797 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) |