Added some debugging for queues. Temporary change

dsg
Dan Lake 2011-03-14 22:17:51 -07:00
parent 7bcab8e975
commit 10e405704a
2 changed files with 9 additions and 5 deletions

View File

@ -254,7 +254,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
void packet_type_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) void packet_type_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
for (int i = 0; i < 9; ++i) for (int i = 0; i < 9; ++i)
m_log.WarnFormat("OutgoingPacket type {0} count = {1}", i, OutgoingPacket.CatCounts[i]); {
int val = Interlocked.Exchange(ref OutgoingPacket.CatCounts[i], 0);
m_log.WarnFormat("OutgoingPacket type {0} count = {1}", i, val);
}
} }
public new void Stop() public new void Stop()

View File

@ -27,7 +27,8 @@
using System; using System;
using OpenSim.Framework; using OpenSim.Framework;
using OpenMetaverse; using OpenMetaverse;
using System.Threading;
namespace OpenSim.Region.ClientStack.LindenUDP namespace OpenSim.Region.ClientStack.LindenUDP
{ {
@ -67,10 +68,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Client = client; Client = client;
Buffer = buffer; Buffer = buffer;
Category = category; Category = category;
int type = (int)category;
if (category == ThrottleOutPacketType.Unknown) if (category == ThrottleOutPacketType.Unknown)
CatCounts[8]++; type = 8;
else Interlocked.Increment(ref OutgoingPacket.CatCounts[type]);
CatCounts[(int)category]++;
} }
} }
} }