From f6d79c7cbbde06f9d8efde8ced8b1eda19f10b9a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Aug 2015 11:07:27 -0700 Subject: Mantis #7713: fixed bug introduced by 1st MOSES patch. --- OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 4847696..2174e51 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -226,7 +226,7 @@ namespace OpenSim.Region.Framework.Scenes // the Total, Simulation, Physics, and Network Frame Time; It is set to // 10 by default but can be changed by the OpenSim.ini configuration file // NumberOfFrames parameter - private int m_numberFramesStored = Scene.m_defaultNumberFramesStored; + private int m_numberFramesStored; // The arrays that will hold the time it took to run the past N frames, // where N is the num_frames_to_average given by the configuration file @@ -259,7 +259,15 @@ namespace OpenSim.Region.Framework.Scenes private IEstateModule estateModule; public SimStatsReporter(Scene scene) + : this(scene, Scene.m_defaultNumberFramesStored) { + } + + public SimStatsReporter(Scene scene, int numberOfFrames) + { + // Store the number of frames from the OpenSim.ini configuration file + m_numberFramesStored = numberOfFrames; + // Initialize the different frame time arrays to the correct sizes m_totalFrameTimeMilliseconds = new double[m_numberFramesStored]; m_simulationFrameTimeMilliseconds = new double[m_numberFramesStored]; @@ -300,13 +308,7 @@ namespace OpenSim.Region.Framework.Scenes StatVerbosity.Info); StatsManager.RegisterStat(SlowFramesStat); - } - - public SimStatsReporter(Scene scene, int numberOfFrames) : this (scene) - { - // Store the number of frames from the OpenSim.ini configuration file - m_numberFramesStored = numberOfFrames; } -- cgit v1.1