From f0126a1575d41df42aa30d011d820a80fc4f64b3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 19 Jul 2013 22:11:32 -0700 Subject: [PATCH] Fixed the stats in show client stats. Also left some comments with observations about AgentUpdates. --- .../ClientStack/Linden/UDP/LLClientView.cs | 18 +++++++++++++----- .../ClientStack/Linden/UDP/LLUDPServer.cs | 2 ++ .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 8 ++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 3d085c3dd4..66a8ea7209 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5567,7 +5567,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Packet Handlers - public int TotalSignificantAgentUpdates { get; private set; } + public int TotalAgentUpdates { get; set; } #region Scene/Avatar @@ -5583,11 +5583,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP // least likely to change. I've made an initial // guess at that. if ( - (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || + /* These 4 are the worst offenders! We should consider ignoring most of them. + * With Singularity, there is a bug where sometimes the spam on these doesn't stop */ (x.CameraAtAxis != m_lastAgentUpdateArgs.CameraAtAxis) || (x.CameraCenter != m_lastAgentUpdateArgs.CameraCenter) || (x.CameraLeftAxis != m_lastAgentUpdateArgs.CameraLeftAxis) || (x.CameraUpAxis != m_lastAgentUpdateArgs.CameraUpAxis) || + /* */ + (x.BodyRotation != m_lastAgentUpdateArgs.BodyRotation) || (x.ControlFlags != m_lastAgentUpdateArgs.ControlFlags) || (x.Far != m_lastAgentUpdateArgs.Far) || (x.Flags != m_lastAgentUpdateArgs.Flags) || @@ -5597,8 +5600,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP (x.AgentID != m_lastAgentUpdateArgs.AgentID) ) { -// m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); - TotalSignificantAgentUpdates++; + //m_log.DebugFormat("[LLCLIENTVIEW]: Cam1 {0} {1}", + // x.CameraAtAxis, x.CameraCenter); + //m_log.DebugFormat("[LLCLIENTVIEW]: Cam2 {0} {1}", + // x.CameraLeftAxis, x.CameraUpAxis); + //m_log.DebugFormat("[LLCLIENTVIEW]: Bod {0} {1}", + // x.BodyRotation, x.HeadRotation); + //m_log.DebugFormat("[LLCLIENTVIEW]: St {0} {1} {2} {3}", + // x.ControlFlags, x.Flags, x.Far, x.State); m_lastAgentUpdateArgs.AgentID = x.AgentID; m_lastAgentUpdateArgs.BodyRotation = x.BodyRotation; @@ -5662,7 +5671,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP // if (update) // { //// m_log.DebugFormat("[LLCLIENTVIEW]: Triggered AgentUpdate for {0}", sener.Name); - TotalSignificantAgentUpdates++; m_thisAgentUpdateArgs.AgentID = x.AgentID; m_thisAgentUpdateArgs.BodyRotation = x.BodyRotation; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 766c2fed8b..32282af19a 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -1312,6 +1312,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_discardAgentUpdates) return; + ((LLClientView)client).TotalAgentUpdates++; + AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; if (agentUpdate.AgentData.SessionID != client.SessionId diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 3e6067d6ee..15dea1742d 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -611,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // if (showParams.Length <= 4) { - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "Sig. AgentUpdates"); + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -630,9 +630,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs, string.Format( - "{0}, {1}%", - llClient.TotalSignificantAgentUpdates, - (float)llClient.TotalSignificantAgentUpdates / cinfo.SyncRequests["AgentUpdate"] * 100)); + "{0} ({1:0.00}%)", + llClient.TotalAgentUpdates, + (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); } }); }