From 4338f4e1d7c841ba447eb2d7481daaa009182bc7 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sun, 29 Nov 2009 05:06:25 -0500 Subject: * Patch from Misterblue to fix Environment.TickCount for statistics purposes. Resolves the wrap-around of the 32 bit uint. * Teravus moved the Environment methods to the Util class --- OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs') diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 3b5455f..f92f440 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -193,6 +193,9 @@ namespace OpenSim.Region.Framework.Scenes // / 10 divides the value by the number of times the sim heartbeat runs (10fps) // Then we divide the whole amount by the amount of seconds pass in between stats updates. + // 'statsUpdateFactor' is how often stats packets are sent in seconds. Used below to change + // values to X-per-second values. + for (int i = 0; i<21;i++) { sb[i] = new SimStatsPacket.StatBlock(); @@ -237,7 +240,7 @@ namespace OpenSim.Region.Framework.Scenes sb[12].StatID = (uint)Stats.OtherMS; sb[12].StatValue = m_otherMS / statsUpdateFactor; - sb[13].StatID = (uint)Stats.InPacketsPerSecond; + sb[13].StatID = (uint)Stats.InPacketsPerSecond; sb[13].StatValue = (m_inPacketsPerSecond / statsUpdateFactor); sb[14].StatID = (uint)Stats.OutPacketsPerSecond; -- cgit v1.1