From 0f4cdc0c5bb750ec4ab7b100dc82d3ff08c9e427 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Mar 2012 19:05:32 +0000 Subject: Explictly close down the StatsReporter so that we can shutdown its timer This is another step necessary for the scene to be garbage collected between performance tests --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++ OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a01b851..6b28581 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1076,6 +1076,8 @@ namespace OpenSim.Region.Framework.Scenes { m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); + StatsReporter.Close(); + m_restartTimer.Stop(); m_restartTimer.Close(); diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 35cd025..210f48d 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -185,6 +185,12 @@ namespace OpenSim.Region.Framework.Scenes OnSendStatsResult += StatsManager.SimExtraStats.ReceiveClassicSimStatsPacket; } + public void Close() + { + m_report.Elapsed -= statsHeartBeat; + m_report.Close(); + } + public void SetUpdateMS(int ms) { statsUpdatesEveryMS = ms; -- cgit v1.1