From 0ddcc55166961d6e10b0250fc521c0663fedd250 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 6 Sep 2015 00:32:20 +0100 Subject: let extra stats travel side by side with viewers ones... try to fix damm array indexes all over the place --- .../Framework/Monitoring/SimExtraStatsCollector.cs | 28 +++++++++++++++------- OpenSim/Framework/SimStats.cs | 14 ++++++++--- 2 files changed, 30 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs index b0fdc81..08c2409 100755 --- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs @@ -34,6 +34,7 @@ using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework.Monitoring.Interfaces; + namespace OpenSim.Framework.Monitoring { /// @@ -71,6 +72,11 @@ namespace OpenSim.Framework.Monitoring private volatile float pendingDownloads; private volatile float pendingUploads; private volatile float activeScripts; + private volatile float spareTime; + private volatile float sleepTime; + private volatile float physicsStep; + + private volatile float scriptLinesPerSecond; private volatile float m_frameDilation; private volatile float m_usersLoggingIn; @@ -253,7 +259,7 @@ namespace OpenSim.Framework.Monitoring /// public void ReceiveClassicSimStatsPacket(SimStats stats) { - // FIXME: SimStats shouldn't allow an arbitrary stat packing order (which is inherited from the original + // FIXME: SimStats shouldn't allow an arbitrary stat packing order (which is inherited from the original // SimStatsPacket that was being used). // For an unknown reason the original designers decided not to @@ -270,8 +276,8 @@ namespace OpenSim.Framework.Monitoring totalFrameTime = stats.StatsBlock[8].StatValue; netFrameTime = stats.StatsBlock[9].StatValue; physicsFrameTime = stats.StatsBlock[10].StatValue; - otherFrameTime = stats.StatsBlock[11].StatValue; - imageFrameTime = stats.StatsBlock[12].StatValue; + imageFrameTime = stats.StatsBlock[11].StatValue; + otherFrameTime = stats.StatsBlock[12].StatValue; inPacketsPerSecond = stats.StatsBlock[13].StatValue; outPacketsPerSecond = stats.StatsBlock[14].StatValue; unackedBytes = stats.StatsBlock[15].StatValue; @@ -279,12 +285,16 @@ namespace OpenSim.Framework.Monitoring pendingDownloads = stats.StatsBlock[17].StatValue; pendingUploads = stats.StatsBlock[18].StatValue; activeScripts = stats.StatsBlock[19].StatValue; - scriptLinesPerSecond = stats.StatsBlock[20].StatValue; - m_frameDilation = stats.StatsBlock[22].StatValue; -// m_usersLoggingIn = stats.StatsBlock[23].StatValue; -// m_totalGeoPrims = stats.StatsBlock[24].StatValue; -// m_totalMeshes = stats.StatsBlock[25].StatValue; -// m_inUseThreads = stats.StatsBlock[26].StatValue; + sleepTime = stats.StatsBlock[20].StatValue; + spareTime = stats.StatsBlock[21].StatValue; + physicsStep = stats.StatsBlock[22].StatValue; + + scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue; + m_frameDilation = stats.ExtraStatsBlock[1].StatValue; + m_usersLoggingIn = stats.ExtraStatsBlock[2].StatValue; + m_totalGeoPrims = stats.ExtraStatsBlock[3].StatValue; + m_totalMeshes = stats.ExtraStatsBlock[4].StatValue; + m_inUseThreads = stats.ExtraStatsBlock[5].StatValue; } /// diff --git a/OpenSim/Framework/SimStats.cs b/OpenSim/Framework/SimStats.cs index 3d8f32f..a811187 100644 --- a/OpenSim/Framework/SimStats.cs +++ b/OpenSim/Framework/SimStats.cs @@ -55,13 +55,19 @@ namespace OpenSim.Framework get { return m_regionBlock; } } private SimStatsPacket.RegionBlock m_regionBlock; - + public SimStatsPacket.StatBlock[] StatsBlock { get { return m_statsBlock; } } private SimStatsPacket.StatBlock[] m_statsBlock; - + + public SimStatsPacket.StatBlock[] ExtraStatsBlock + { + get { return m_extraStatsBlock; } + } + private SimStatsPacket.StatBlock[] m_extraStatsBlock; + public uint RegionFlags { get { return m_regionFlags; } @@ -82,7 +88,8 @@ namespace OpenSim.Framework public SimStats( uint regionX, uint regionY, uint regionFlags, uint objectCapacity, - SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock, UUID pRUUID) + SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock, + SimStatsPacket.StatBlock[] ExtraStatsBlock, UUID pRUUID) { regionUUID = pRUUID; m_regionX = regionX; @@ -91,6 +98,7 @@ namespace OpenSim.Framework m_objectCapacity = objectCapacity; m_regionBlock = regionBlock; m_statsBlock = statsBlock; + m_extraStatsBlock = ExtraStatsBlock; } } } -- cgit v1.1