diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 6e6b3ef..18abfd6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -31,6 +31,7 @@ using System.Net.Sockets; | |||
31 | using System.Threading; | 31 | using System.Threading; |
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Monitoring; | ||
34 | 35 | ||
35 | namespace OpenMetaverse | 36 | namespace OpenMetaverse |
36 | { | 37 | { |
@@ -107,9 +108,25 @@ namespace OpenMetaverse | |||
107 | public void StartInbound(int recvBufferSize, bool asyncPacketHandling) | 108 | public void StartInbound(int recvBufferSize, bool asyncPacketHandling) |
108 | { | 109 | { |
109 | if (UsePools) | 110 | if (UsePools) |
111 | { | ||
110 | m_pool = new Pool<UDPPacketBuffer>(() => new UDPPacketBuffer(), 500); | 112 | m_pool = new Pool<UDPPacketBuffer>(() => new UDPPacketBuffer(), 500); |
113 | |||
114 | StatsManager.RegisterStat( | ||
115 | new Stat( | ||
116 | "UDPPacketBufferPoolCount", | ||
117 | "Objects within the UDPPacketBuffer pool", | ||
118 | "The number of objects currently stored within the UDPPacketBuffer pool", | ||
119 | "", | ||
120 | "clientstack", | ||
121 | "packetpool", | ||
122 | StatType.Pull, | ||
123 | stat => stat.Value = m_pool.Count, | ||
124 | StatVerbosity.Debug)); | ||
125 | } | ||
111 | else | 126 | else |
127 | { | ||
112 | m_pool = null; | 128 | m_pool = null; |
129 | } | ||
113 | 130 | ||
114 | m_asyncPacketHandling = asyncPacketHandling; | 131 | m_asyncPacketHandling = asyncPacketHandling; |
115 | 132 | ||