diff options
author | Justin Clark-Casey (justincc) | 2013-07-22 23:58:45 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-07-23 00:35:23 +0100 |
commit | 8396f1bd42cf42d412c09e769c491930aaa8bfea (patch) | |
tree | 22170f9de9d8b454e59a6826976df8e1d2ed4689 /OpenSim/Region | |
parent | Add AverageUDPProcessTime stat to try and get a handle on how long we're taki... (diff) | |
download | opensim-SC-8396f1bd42cf42d412c09e769c491930aaa8bfea.zip opensim-SC-8396f1bd42cf42d412c09e769c491930aaa8bfea.tar.gz opensim-SC-8396f1bd42cf42d412c09e769c491930aaa8bfea.tar.bz2 opensim-SC-8396f1bd42cf42d412c09e769c491930aaa8bfea.tar.xz |
Record raw number of UDP receives as clientstack.IncomingUDPReceivesCount
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | 8 |
2 files changed, 20 insertions, 1 deletions
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 | |||
69 | 69 | ||
70 | StatsManager.RegisterStat( | 70 | StatsManager.RegisterStat( |
71 | new Stat( | 71 | new Stat( |
72 | "IncomingUDPReceivesCount", | ||
73 | "Number of inbound LL protocol packets processed", | ||
74 | "Number of inbound LL protocol packets processed", | ||
75 | "", | ||
76 | "clientstack", | ||
77 | scene.Name, | ||
78 | StatType.Pull, | ||
79 | MeasuresOfInterest.AverageChangeOverTime, | ||
80 | stat => stat.Value = m_udpServer.UdpReceives, | ||
81 | StatVerbosity.Debug)); | ||
82 | |||
83 | StatsManager.RegisterStat( | ||
84 | new Stat( | ||
72 | "IncomingPacketsProcessedCount", | 85 | "IncomingPacketsProcessedCount", |
73 | "Number of inbound LL protocol packets processed", | 86 | "Number of inbound LL protocol packets processed", |
74 | "Number of inbound LL protocol packets processed", | 87 | "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 | |||
78 | public bool IsRunningOutbound { get; private set; } | 78 | public bool IsRunningOutbound { get; private set; } |
79 | 79 | ||
80 | /// <summary> | 80 | /// <summary> |
81 | /// Number of UDP receives. | ||
82 | /// </summary> | ||
83 | public int UdpReceives { get; private set; } | ||
84 | |||
85 | /// <summary> | ||
81 | /// Number of receives over which to establish a receive time average. | 86 | /// Number of receives over which to establish a receive time average. |
82 | /// </summary> | 87 | /// </summary> |
83 | private readonly static int s_receiveTimeSamples = 500; | 88 | private readonly static int s_receiveTimeSamples = 500; |
@@ -295,6 +300,8 @@ namespace OpenMetaverse | |||
295 | // to AsyncBeginReceive | 300 | // to AsyncBeginReceive |
296 | if (IsRunningInbound) | 301 | if (IsRunningInbound) |
297 | { | 302 | { |
303 | UdpReceives++; | ||
304 | |||
298 | // Asynchronous mode will start another receive before the | 305 | // Asynchronous mode will start another receive before the |
299 | // callback for this packet is even fired. Very parallel :-) | 306 | // callback for this packet is even fired. Very parallel :-) |
300 | if (m_asyncPacketHandling) | 307 | if (m_asyncPacketHandling) |
@@ -345,7 +352,6 @@ namespace OpenMetaverse | |||
345 | if (!m_asyncPacketHandling) | 352 | if (!m_asyncPacketHandling) |
346 | AsyncBeginReceive(); | 353 | AsyncBeginReceive(); |
347 | } | 354 | } |
348 | |||
349 | } | 355 | } |
350 | } | 356 | } |
351 | 357 | ||