diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 1156bbb3de..a974e529d6 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -244,7 +244,17 @@ 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; + m_elapsedMSSinceLastStatReport = Environment.TickCount; + System.Timers.Timer packet_type_timer = new System.Timers.Timer(10000); + packet_type_timer.Elapsed +=new System.Timers.ElapsedEventHandler(packet_type_timer_Elapsed); + packet_type_timer.AutoReset = true; + packet_type_timer.Start(); + } + + void packet_type_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + for (int i = 0; i < 8; ++i) + m_log.WarnFormat("OutgoingPacket type {0} count = {1}", i, OutgoingPacket.CatCounts[i]); } public new void Stop() diff --git a/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs index 1a1a1cb4e3..f375700c6e 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs @@ -53,6 +53,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Category this packet belongs to public ThrottleOutPacketType Category; + public static int[] CatCounts = new int[8]; + /// /// Default constructor /// @@ -64,7 +66,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { Client = client; Buffer = buffer; - Category = category; + Category = category; + CatCounts[(int)category]++; } } }