From 8296413add95ce2a56f308fa7e762196155dd028 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 27 Nov 2009 19:17:36 -0500 Subject: * Re-enable lightweight packet tracking stats on a 3000 ms interval. --- OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index c773c05..338f2bb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -138,6 +138,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// whether or not to sleep private bool m_packetSent; + /// Environment.TickCount of the last time that packet stats were reported to the scene + private int m_elapsedMSSinceLastStatReport = 0; /// Environment.TickCount of the last time the outgoing packet handler executed private int m_tickLastOutgoingPacketHandler; /// Keeps track of the number of elapsed milliseconds since the last time the outgoing packet handler looped @@ -246,6 +248,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Start the packet processing threads Watchdog.StartThread(IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false); Watchdog.StartThread(OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false); + m_elapsedMSSinceLastStatReport = Environment.TickCount; } public new void Stop() @@ -716,6 +719,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // We don't need to do anything else with ping checks StartPingCheckPacket startPing = (StartPingCheckPacket)packet; CompletePing(udpClient, startPing.PingID.PingID); + + if ((Environment.TickCount - m_elapsedMSSinceLastStatReport) >= 3000) + { + udpClient.SendPacketStats(); + m_elapsedMSSinceLastStatReport = Environment.TickCount; + } return; } else if (packet.Type == PacketType.CompletePingCheck) -- cgit v1.1