diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index f8391d7..fcc69c0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -469,6 +469,60 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
469 | 469 | ||
470 | m_scene = (Scene)scene; | 470 | m_scene = (Scene)scene; |
471 | m_location = new Location(m_scene.RegionInfo.RegionHandle); | 471 | m_location = new Location(m_scene.RegionInfo.RegionHandle); |
472 | |||
473 | // XXX: These stats are also pool stats but we register them separately since they are currently not | ||
474 | // turned on and off by EnablePools()/DisablePools() | ||
475 | StatsManager.RegisterStat( | ||
476 | new PercentageStat( | ||
477 | "PacketsReused", | ||
478 | "Packets reused", | ||
479 | "Number of packets reused out of all requests to the packet pool", | ||
480 | "clientstack", | ||
481 | m_scene.Name, | ||
482 | StatType.Pull, | ||
483 | stat => | ||
484 | { PercentageStat pstat = (PercentageStat)stat; | ||
485 | pstat.Consequent = PacketPool.Instance.PacketsRequested; | ||
486 | pstat.Antecedent = PacketPool.Instance.PacketsReused; }, | ||
487 | StatVerbosity.Debug)); | ||
488 | |||
489 | StatsManager.RegisterStat( | ||
490 | new PercentageStat( | ||
491 | "PacketDataBlocksReused", | ||
492 | "Packet data blocks reused", | ||
493 | "Number of data blocks reused out of all requests to the packet pool", | ||
494 | "clientstack", | ||
495 | m_scene.Name, | ||
496 | StatType.Pull, | ||
497 | stat => | ||
498 | { PercentageStat pstat = (PercentageStat)stat; | ||
499 | pstat.Consequent = PacketPool.Instance.BlocksRequested; | ||
500 | pstat.Antecedent = PacketPool.Instance.BlocksReused; }, | ||
501 | StatVerbosity.Debug)); | ||
502 | |||
503 | StatsManager.RegisterStat( | ||
504 | new Stat( | ||
505 | "PacketsPoolCount", | ||
506 | "Objects within the packet pool", | ||
507 | "The number of objects currently stored within the packet pool", | ||
508 | "", | ||
509 | "clientstack", | ||
510 | m_scene.Name, | ||
511 | StatType.Pull, | ||
512 | stat => stat.Value = PacketPool.Instance.PacketsPooled, | ||
513 | StatVerbosity.Debug)); | ||
514 | |||
515 | StatsManager.RegisterStat( | ||
516 | new Stat( | ||
517 | "PacketDataBlocksPoolCount", | ||
518 | "Objects within the packet data block pool", | ||
519 | "The number of objects currently stored within the packet data block pool", | ||
520 | "", | ||
521 | "clientstack", | ||
522 | m_scene.Name, | ||
523 | StatType.Pull, | ||
524 | stat => stat.Value = PacketPool.Instance.BlocksPooled, | ||
525 | StatVerbosity.Debug)); | ||
472 | 526 | ||
473 | // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by | 527 | // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by |
474 | // scene name | 528 | // scene name |