aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-10-02 23:49:37 +0100
committerJustin Clark-Casey (justincc)2014-11-25 23:18:39 +0000
commit51eb8facd6734bbdc57718f4adf065af38e0a87d (patch)
tree43e45a341bf56d0e10c5e7ce9789b959bb010e62 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
parentminor: Remove compiler warnings from unused fields in TokenBucket (diff)
downloadopensim-SC_OLD-51eb8facd6734bbdc57718f4adf065af38e0a87d.zip
opensim-SC_OLD-51eb8facd6734bbdc57718f4adf065af38e0a87d.tar.gz
opensim-SC_OLD-51eb8facd6734bbdc57718f4adf065af38e0a87d.tar.bz2
opensim-SC_OLD-51eb8facd6734bbdc57718f4adf065af38e0a87d.tar.xz
Add OutgoingPacketsQueuedCount clientstack stat.
This is the total of queued outgoing packets across all connections, as also seen in the "show queues" command. Gives some early indication of whether the simulator can't send all outgoing packets fast enough. Though then one would want to check that this isn't due to a few bad client connections.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index fc6fb3e..664e23e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -688,6 +688,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
688 StatType.Pull, 688 StatType.Pull,
689 stat => stat.Value = PacketPool.Instance.BlocksPooled, 689 stat => stat.Value = PacketPool.Instance.BlocksPooled,
690 StatVerbosity.Debug)); 690 StatVerbosity.Debug));
691
692 StatsManager.RegisterStat(
693 new Stat(
694 "OutgoingPacketsQueuedCount",
695 "Packets queued for outgoing send",
696 "Number of queued outgoing packets across all connections",
697 "",
698 "clientstack",
699 Scene.Name,
700 StatType.Pull,
701 MeasuresOfInterest.AverageChangeOverTime,
702 stat => stat.Value = GetTotalQueuedOutgoingPackets(),
703 StatVerbosity.Info));
691 704
692 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by 705 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by
693 // scene name 706 // scene name
@@ -703,6 +716,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
703 return x == m_location; 716 return x == m_location;
704 } 717 }
705 718
719 public int GetTotalQueuedOutgoingPackets()
720 {
721 int total = 0;
722
723 foreach (ScenePresence sp in Scene.GetScenePresences())
724 {
725 LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
726 total += udpClient.GetTotalPacketsQueuedCount();
727 }
728
729 return total;
730 }
731
706// public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting) 732// public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting)
707// { 733// {
708// // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way 734// // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way