diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 03cd2b49e6..5d3b5b556b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3801,7 +3801,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber); // Count this as a resent packet since we are going to requeue all of the updates contained in it - Interlocked.Increment(ref m_udpClient.PacketsResent); + Interlocked.Increment(ref m_udpClient.PacketsResent); + + // We're not going to worry about interlock yet since its not currently critical that this total count + // is 100% correct + m_udpServer.PacketsResentCount++; foreach (EntityUpdate update in updates) ResendPrimUpdate(update); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 218c2b2444..ca17771ac6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -145,6 +145,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP stat => stat.Value = m_udpServer.UdpSends, StatVerbosity.Debug)); + StatsManager.RegisterStat( + new Stat( + "OutgoingPacketsResentCount", + "Number of packets resent because a client did not acknowledge receipt", + "", + "", + "clientstack", + scene.Name, + StatType.Pull, + MeasuresOfInterest.AverageChangeOverTime, + stat => stat.Value = m_udpServer.PacketsResentCount, + StatVerbosity.Debug)); + StatsManager.RegisterStat( new Stat( "AverageUDPProcessTime", @@ -294,6 +307,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP public Socket Server { get { return null; } } + /// + /// Record how many packets have been resent + /// + internal int PacketsResentCount { get; set; } + + /// + /// Record how many packets have been sent + /// + internal int PacketsSentCount { get; set; } + /// /// Record how many inbound packets could not be recognized as LLUDP packets. /// @@ -1221,6 +1244,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Stats tracking Interlocked.Increment(ref udpClient.PacketsSent); + // We're not going to worry about interlock yet since its not currently critical that this total count + // is 100% correct + PacketsSentCount++; + // Put the UDP payload on the wire AsyncBeginSend(buffer);