From 2413e9eb3fe63307660202f913eee1c877340372 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 2 Feb 2011 20:00:50 +0000
Subject: Record number of resent packets in LindenUDP stack and display in
stats report
---
.../Region/ClientStack/LindenUDP/LLUDPClient.cs | 7 +++++--
.../Region/ClientStack/LindenUDP/LLUDPServer.cs | 5 ++++-
.../Agent/UDP/Linden/LindenUDPInfoModule.cs | 24 ++++++++++++----------
3 files changed, 22 insertions(+), 14 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
index 21bd99e..65a8fe3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs
@@ -122,6 +122,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int PacketsReceived;
/// Number of packets sent to this client
public int PacketsSent;
+ /// Number of packets resent to this client
+ public int PacketsResent;
/// Total byte count of unacked packets sent to this client
public int UnackedBytes;
@@ -256,9 +258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public string GetStats()
{
return string.Format(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
+ PacketsReceived,
PacketsSent,
- PacketsReceived,
+ PacketsResent,
UnackedBytes,
m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count,
m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count,
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index df8ddbb..5ff9aee 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -506,7 +506,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Bump up the resend count on this packet
Interlocked.Increment(ref outgoingPacket.ResendCount);
- //Interlocked.Increment(ref Stats.ResentPackets);
// Requeue or resend the packet
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, false))
@@ -582,6 +581,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
udpClient.NeedAcks.Add(outgoingPacket);
}
}
+ else
+ {
+ Interlocked.Increment(ref udpClient.PacketsResent);
+ }
#endregion Sequence Number Assignment
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
index 87d067c..6630edb 100644
--- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs
@@ -154,24 +154,26 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
report.AppendFormat(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n",
"Pkts",
"Pkts",
+ "Pkts",
"Bytes",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts",
- "Pkts");
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts",
+ "Q Pkts");
report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
report.AppendFormat(
- "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n",
- "Out",
+ "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n",
"In",
+ "Out",
+ "Resent",
"Unacked",
"Resend",
"Land",
--
cgit v1.1