aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-02-02 20:00:50 +0000
committerJustin Clark-Casey (justincc)2011-02-02 20:00:50 +0000
commit2413e9eb3fe63307660202f913eee1c877340372 (patch)
tree82b0d55ad7ffc1fecd196781d878838f340e78d7 /OpenSim/Region
parentStop double counting dequeued packets for packets sent number (diff)
downloadopensim-SC_OLD-2413e9eb3fe63307660202f913eee1c877340372.zip
opensim-SC_OLD-2413e9eb3fe63307660202f913eee1c877340372.tar.gz
opensim-SC_OLD-2413e9eb3fe63307660202f913eee1c877340372.tar.bz2
opensim-SC_OLD-2413e9eb3fe63307660202f913eee1c877340372.tar.xz
Record number of resent packets in LindenUDP stack and display in stats report
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs7
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs24
3 files changed, 22 insertions, 14 deletions
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
122 public int PacketsReceived; 122 public int PacketsReceived;
123 /// <summary>Number of packets sent to this client</summary> 123 /// <summary>Number of packets sent to this client</summary>
124 public int PacketsSent; 124 public int PacketsSent;
125 /// <summary>Number of packets resent to this client</summary>
126 public int PacketsResent;
125 /// <summary>Total byte count of unacked packets sent to this client</summary> 127 /// <summary>Total byte count of unacked packets sent to this client</summary>
126 public int UnackedBytes; 128 public int UnackedBytes;
127 129
@@ -256,9 +258,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
256 public string GetStats() 258 public string GetStats()
257 { 259 {
258 return string.Format( 260 return string.Format(
259 "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}", 261 "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}",
262 PacketsReceived,
260 PacketsSent, 263 PacketsSent,
261 PacketsReceived, 264 PacketsResent,
262 UnackedBytes, 265 UnackedBytes,
263 m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count, 266 m_packetOutboxes[(int)ThrottleOutPacketType.Resend].Count,
264 m_packetOutboxes[(int)ThrottleOutPacketType.Land].Count, 267 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
506 506
507 // Bump up the resend count on this packet 507 // Bump up the resend count on this packet
508 Interlocked.Increment(ref outgoingPacket.ResendCount); 508 Interlocked.Increment(ref outgoingPacket.ResendCount);
509 //Interlocked.Increment(ref Stats.ResentPackets);
510 509
511 // Requeue or resend the packet 510 // Requeue or resend the packet
512 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, false)) 511 if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, false))
@@ -582,6 +581,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
582 udpClient.NeedAcks.Add(outgoingPacket); 581 udpClient.NeedAcks.Add(outgoingPacket);
583 } 582 }
584 } 583 }
584 else
585 {
586 Interlocked.Increment(ref udpClient.PacketsResent);
587 }
585 588
586 #endregion Sequence Number Assignment 589 #endregion Sequence Number Assignment
587 590
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
154 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); 154 report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding));
155 155
156 report.AppendFormat( 156 report.AppendFormat(
157 "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", 157 "{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",
158 "Pkts", 158 "Pkts",
159 "Pkts", 159 "Pkts",
160 "Pkts",
160 "Bytes", 161 "Bytes",
161 "Pkts", 162 "Q Pkts",
162 "Pkts", 163 "Q Pkts",
163 "Pkts", 164 "Q Pkts",
164 "Pkts", 165 "Q Pkts",
165 "Pkts", 166 "Q Pkts",
166 "Pkts", 167 "Q Pkts",
167 "Pkts", 168 "Q Pkts",
168 "Pkts"); 169 "Q Pkts");
169 170
170 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); 171 report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", "");
171 report.AppendFormat( 172 report.AppendFormat(
172 "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", 173 "{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",
173 "Out",
174 "In", 174 "In",
175 "Out",
176 "Resent",
175 "Unacked", 177 "Unacked",
176 "Resend", 178 "Resend",
177 "Land", 179 "Land",