From 8396f1bd42cf42d412c09e769c491930aaa8bfea Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 22 Jul 2013 23:58:45 +0100 Subject: Record raw number of UDP receives as clientstack.IncomingUDPReceivesCount --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 13 +++++++++++++ OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index d3823f3..5300b1e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -69,6 +69,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP StatsManager.RegisterStat( new Stat( + "IncomingUDPReceivesCount", + "Number of inbound LL protocol packets processed", + "Number of inbound LL protocol packets processed", + "", + "clientstack", + scene.Name, + StatType.Pull, + MeasuresOfInterest.AverageChangeOverTime, + stat => stat.Value = m_udpServer.UdpReceives, + StatVerbosity.Debug)); + + StatsManager.RegisterStat( + new Stat( "IncomingPacketsProcessedCount", "Number of inbound LL protocol packets processed", "Number of inbound LL protocol packets processed", diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 46a3261..b4044b5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs @@ -78,6 +78,11 @@ namespace OpenMetaverse public bool IsRunningOutbound { get; private set; } /// + /// Number of UDP receives. + /// + public int UdpReceives { get; private set; } + + /// /// Number of receives over which to establish a receive time average. /// private readonly static int s_receiveTimeSamples = 500; @@ -295,6 +300,8 @@ namespace OpenMetaverse // to AsyncBeginReceive if (IsRunningInbound) { + UdpReceives++; + // Asynchronous mode will start another receive before the // callback for this packet is even fired. Very parallel :-) if (m_asyncPacketHandling) @@ -345,7 +352,6 @@ namespace OpenMetaverse if (!m_asyncPacketHandling) AsyncBeginReceive(); } - } } -- cgit v1.1