diff options
author | Justin Clark-Casey (justincc) | 2012-10-23 01:50:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-23 01:52:10 +0100 |
commit | 4578ff74fec7500902f58fbdee6ce5a6b39601fb (patch) | |
tree | 5058ada18085a83ae8a76a791ba1052c7025b6d6 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |
parent | minor: Get content type handler logger to log "unset" for the content type in... (diff) | |
download | opensim-SC-4578ff74fec7500902f58fbdee6ce5a6b39601fb.zip opensim-SC-4578ff74fec7500902f58fbdee6ce5a6b39601fb.tar.gz opensim-SC-4578ff74fec7500902f58fbdee6ce5a6b39601fb.tar.bz2 opensim-SC-4578ff74fec7500902f58fbdee6ce5a6b39601fb.tar.xz |
Add object count stats for new IncomingPacket and UDPPacketBuffer pools if they are enabled. Add count stats for existing LLUDP pool.
This introduces a pull stat type in addition to the push stat type.
A pull stat takes a method on construction which knows how to update the stat on request.
In this way, special interfaces for pull stat collection are not necessary.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 419de66..bcfd392 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -278,7 +278,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
278 | ThrottleRates = new ThrottleRates(configSource); | 278 | ThrottleRates = new ThrottleRates(configSource); |
279 | 279 | ||
280 | if (UsePools) | 280 | if (UsePools) |
281 | { | ||
281 | m_incomingPacketPool = new Pool<IncomingPacket>(() => new IncomingPacket(), 500); | 282 | m_incomingPacketPool = new Pool<IncomingPacket>(() => new IncomingPacket(), 500); |
283 | |||
284 | StatsManager.RegisterStat( | ||
285 | new Stat( | ||
286 | "IncomingPacketPoolCount", | ||
287 | "Objects within incoming packet pool", | ||
288 | "The number of objects currently stored within the incoming packet pool", | ||
289 | "", | ||
290 | "clientstack", | ||
291 | "packetpool", | ||
292 | StatType.Pull, | ||
293 | stat => stat.Value = m_incomingPacketPool.Count, | ||
294 | StatVerbosity.Debug)); | ||
295 | } | ||
282 | } | 296 | } |
283 | 297 | ||
284 | public void Start() | 298 | public void Start() |