Add clientstack.InboxPacketsCount stat. This records the number of packets waiting to be processed at the second stage (after initial UDP processing)

If this consistently increases then this is a problem since it means the simulator is receiving more requests than it can distribute to other parts of the code.
cpu-performance
Justin Clark-Casey (justincc) 2013-07-23 00:31:57 +01:00
parent 0d90834f86
commit 35e46c2836
1 changed files with 13 additions and 0 deletions

View File

@ -500,6 +500,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_scene = (Scene)scene; m_scene = (Scene)scene;
m_location = new Location(m_scene.RegionInfo.RegionHandle); m_location = new Location(m_scene.RegionInfo.RegionHandle);
StatsManager.RegisterStat(
new Stat(
"InboxPacketsCount",
"Number of LL protocol packets waiting for the second stage of processing after initial receive.",
"Number of LL protocol packets waiting for the second stage of processing after initial receive.",
"",
"clientstack",
scene.Name,
StatType.Pull,
MeasuresOfInterest.AverageChangeOverTime,
stat => stat.Value = packetInbox.Count,
StatVerbosity.Debug));
// XXX: These stats are also pool stats but we register them separately since they are currently not // XXX: These stats are also pool stats but we register them separately since they are currently not
// turned on and off by EnablePools()/DisablePools() // turned on and off by EnablePools()/DisablePools()
StatsManager.RegisterStat( StatsManager.RegisterStat(