Added some debugging for queues. Temporary change

dsg
Dan Lake 2011-03-14 22:37:09 -07:00
parent 10e405704a
commit afca24acbe
2 changed files with 10 additions and 10 deletions

View File

@ -255,7 +255,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
for (int i = 0; i < 9; ++i)
{
int val = Interlocked.Exchange(ref OutgoingPacket.CatCounts[i], 0);
int val = Interlocked.Exchange(ref CatCounts[i], 0);
m_log.WarnFormat("OutgoingPacket type {0} count = {1}", i, val);
}
}
@ -360,7 +360,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
byte[] data = packet.ToBytes();
SendPacketData(udpClient, data, packet.Type, category);
}
}
}
private int[] CatCounts = new int[9];
/// <summary>
/// Start the process of sending a packet to the client.
@ -424,7 +426,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Queue or Send
OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category);
OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category);
if (category == ThrottleOutPacketType.Unknown)
Interlocked.Increment(ref CatCounts[8]);
else
Interlocked.Increment(ref CatCounts[(int)category]);
// If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will
// continue to display the deleted object until relog. Therefore, we need to always queue a kill object

View File

@ -54,8 +54,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary>Category this packet belongs to</summary>
public ThrottleOutPacketType Category;
public static int[] CatCounts = new int[9];
/// <summary>
/// Default constructor
/// </summary>
@ -67,11 +65,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
Client = client;
Buffer = buffer;
Category = category;
int type = (int)category;
if (category == ThrottleOutPacketType.Unknown)
type = 8;
Interlocked.Increment(ref OutgoingPacket.CatCounts[type]);
Category = category;
}
}
}