diff options
author | Justin Clark-Casey (justincc) | 2013-07-23 00:15:58 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-07-23 00:35:34 +0100 |
commit | 60732c96efd149bbb0484b327b00463dc5b81aff (patch) | |
tree | 92600972becc714b6e2f6af61fbd9eaecf1e38d6 /OpenSim/Region | |
parent | Record raw number of UDP receives as clientstack.IncomingUDPReceivesCount (diff) | |
download | opensim-SC_OLD-60732c96efd149bbb0484b327b00463dc5b81aff.zip opensim-SC_OLD-60732c96efd149bbb0484b327b00463dc5b81aff.tar.gz opensim-SC_OLD-60732c96efd149bbb0484b327b00463dc5b81aff.tar.bz2 opensim-SC_OLD-60732c96efd149bbb0484b327b00463dc5b81aff.tar.xz |
Add clientstack.OutgoingUDPSendsCount stat to show number of outbound UDP packets sent by a region per second
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 7 |
2 files changed, 22 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 5300b1e..cc4de10 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -70,8 +70,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
70 | StatsManager.RegisterStat( | 70 | StatsManager.RegisterStat( |
71 | new Stat( | 71 | new Stat( |
72 | "IncomingUDPReceivesCount", | 72 | "IncomingUDPReceivesCount", |
73 | "Number of inbound LL protocol packets processed", | 73 | "Number of UDP receives performed", |
74 | "Number of inbound LL protocol packets processed", | 74 | "Number of UDP receives performed", |
75 | "", | 75 | "", |
76 | "clientstack", | 76 | "clientstack", |
77 | scene.Name, | 77 | scene.Name, |
@@ -95,6 +95,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
95 | 95 | ||
96 | StatsManager.RegisterStat( | 96 | StatsManager.RegisterStat( |
97 | new Stat( | 97 | new Stat( |
98 | "OutgoingUDPSendsCount", | ||
99 | "Number of UDP sends performed", | ||
100 | "Number of UDP sends performed", | ||
101 | "", | ||
102 | "clientstack", | ||
103 | scene.Name, | ||
104 | StatType.Pull, | ||
105 | MeasuresOfInterest.AverageChangeOverTime, | ||
106 | stat => stat.Value = m_udpServer.UdpSends, | ||
107 | StatVerbosity.Debug)); | ||
108 | |||
109 | StatsManager.RegisterStat( | ||
110 | new Stat( | ||
98 | "AverageUDPProcessTime", | 111 | "AverageUDPProcessTime", |
99 | "Average number of milliseconds taken to process each incoming UDP packet in a sample.", | 112 | "Average number of milliseconds taken to process each incoming UDP packet in a sample.", |
100 | "This is for initial receive processing which is separate from the later client LL packet processing stage.", | 113 | "This is for initial receive processing which is separate from the later client LL packet processing stage.", |
@@ -856,7 +869,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
856 | 869 | ||
857 | PacketPool.Instance.ReturnPacket(packet); | 870 | PacketPool.Instance.ReturnPacket(packet); |
858 | m_dataPresentEvent.Set(); | 871 | m_dataPresentEvent.Set(); |
859 | |||
860 | } | 872 | } |
861 | 873 | ||
862 | private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); | 874 | private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index b4044b5..d0ed7e8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -83,6 +83,11 @@ namespace OpenMetaverse | |||
83 | public int UdpReceives { get; private set; } | 83 | public int UdpReceives { get; private set; } |
84 | 84 | ||
85 | /// <summary> | 85 | /// <summary> |
86 | /// Number of UDP sends | ||
87 | /// </summary> | ||
88 | public int UdpSends { get; private set; } | ||
89 | |||
90 | /// <summary> | ||
86 | /// Number of receives over which to establish a receive time average. | 91 | /// Number of receives over which to establish a receive time average. |
87 | /// </summary> | 92 | /// </summary> |
88 | private readonly static int s_receiveTimeSamples = 500; | 93 | private readonly static int s_receiveTimeSamples = 500; |
@@ -381,6 +386,8 @@ namespace OpenMetaverse | |||
381 | { | 386 | { |
382 | // UDPPacketBuffer buf = (UDPPacketBuffer)result.AsyncState; | 387 | // UDPPacketBuffer buf = (UDPPacketBuffer)result.AsyncState; |
383 | m_udpSocket.EndSendTo(result); | 388 | m_udpSocket.EndSendTo(result); |
389 | |||
390 | UdpSends++; | ||
384 | } | 391 | } |
385 | catch (SocketException) { } | 392 | catch (SocketException) { } |
386 | catch (ObjectDisposedException) { } | 393 | catch (ObjectDisposedException) { } |