diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs index 2a3d14f..9f22fb4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/PacketPool.cs | |||
@@ -47,18 +47,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
47 | private PercentageStat m_packetsReusedStat = new PercentageStat( | 47 | private PercentageStat m_packetsReusedStat = new PercentageStat( |
48 | "PacketsReused", | 48 | "PacketsReused", |
49 | "Packets reused", | 49 | "Packets reused", |
50 | "Number of packets reused out of all requests to the packet pool", | ||
50 | "clientstack", | 51 | "clientstack", |
51 | "packetpool", | 52 | "packetpool", |
52 | StatVerbosity.Debug, | 53 | StatType.Push, |
53 | "Number of packets reused out of all requests to the packet pool"); | 54 | null, |
55 | StatVerbosity.Debug); | ||
54 | 56 | ||
55 | private PercentageStat m_blocksReusedStat = new PercentageStat( | 57 | private PercentageStat m_blocksReusedStat = new PercentageStat( |
56 | "BlocksReused", | 58 | "PacketDataBlocksReused", |
57 | "Blocks reused", | 59 | "Packet data blocks reused", |
60 | "Number of data blocks reused out of all requests to the packet pool", | ||
58 | "clientstack", | 61 | "clientstack", |
59 | "packetpool", | 62 | "packetpool", |
60 | StatVerbosity.Debug, | 63 | StatType.Push, |
61 | "Number of data blocks reused out of all requests to the packet pool"); | 64 | null, |
65 | StatVerbosity.Debug); | ||
62 | 66 | ||
63 | /// <summary> | 67 | /// <summary> |
64 | /// Pool of packets available for reuse. | 68 | /// Pool of packets available for reuse. |
@@ -88,6 +92,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
88 | { | 92 | { |
89 | StatsManager.RegisterStat(m_packetsReusedStat); | 93 | StatsManager.RegisterStat(m_packetsReusedStat); |
90 | StatsManager.RegisterStat(m_blocksReusedStat); | 94 | StatsManager.RegisterStat(m_blocksReusedStat); |
95 | |||
96 | StatsManager.RegisterStat( | ||
97 | new Stat( | ||
98 | "PacketsPoolCount", | ||
99 | "Objects within the packet pool", | ||
100 | "The number of objects currently stored within the packet pool", | ||
101 | "", | ||
102 | "clientstack", | ||
103 | "packetpool", | ||
104 | StatType.Pull, | ||
105 | stat => { lock (pool) { stat.Value = pool.Count; } }, | ||
106 | StatVerbosity.Debug)); | ||
107 | |||
108 | StatsManager.RegisterStat( | ||
109 | new Stat( | ||
110 | "PacketDataBlocksPoolCount", | ||
111 | "Objects within the packet data block pool", | ||
112 | "The number of objects currently stored within the packet data block pool", | ||
113 | "", | ||
114 | "clientstack", | ||
115 | "packetpool", | ||
116 | StatType.Pull, | ||
117 | stat => { lock (DataBlocks) { stat.Value = DataBlocks.Count; } }, | ||
118 | StatVerbosity.Debug)); | ||
91 | } | 119 | } |
92 | 120 | ||
93 | /// <summary> | 121 | /// <summary> |