mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -278,7 +278,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
ThrottleRates = new ThrottleRates(configSource);
|
||||
|
||||
if (UsePools)
|
||||
{
|
||||
m_incomingPacketPool = new Pool<IncomingPacket>(() => new IncomingPacket(), 500);
|
||||
|
||||
StatsManager.RegisterStat(
|
||||
new Stat(
|
||||
"IncomingPacketPoolCount",
|
||||
"Objects within incoming packet pool",
|
||||
"The number of objects currently stored within the incoming packet pool",
|
||||
"",
|
||||
"clientstack",
|
||||
"packetpool",
|
||||
StatType.Pull,
|
||||
stat => stat.Value = m_incomingPacketPool.Count,
|
||||
StatVerbosity.Debug));
|
||||
}
|
||||
}
|
||||
|
||||
public void Start()
|
||||
|
||||
Reference in New Issue
Block a user