mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Add OutgoingPacketsQueuedCount clientstack stat.
This is the total of queued outgoing packets across all connections, as also seen in the "show queues" command. Gives some early indication of whether the simulator can't send all outgoing packets fast enough. Though then one would want to check that this isn't due to a few bad client connections.
This commit is contained in:
@@ -319,6 +319,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the total number of pakcets queued for this client.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int GetTotalPacketsQueuedCount()
|
||||
{
|
||||
int total = 0;
|
||||
|
||||
for (int i = 0; i <= (int)ThrottleOutPacketType.Asset; i++)
|
||||
total += m_packetOutboxes[i].Count;
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of packets queued for the given throttle type.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <param name="throttleType"></param>
|
||||
public int GetPacketsQueuedCount(ThrottleOutPacketType throttleType)
|
||||
{
|
||||
if ((int)throttleType > 0)
|
||||
return m_packetOutboxes[(int)throttleType].Count;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return statistics information about client packet queues.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user