From 4e5b2346a5700b14687a33175ba54a93960a9d33 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 16 Oct 2012 23:44:52 +0100 Subject: Add LastMemoryChurn stat using existing data so we can more quickly tell how memory churn changes rather than waiting for the average to move. --- OpenSim/Framework/Monitoring/MemoryWatchdog.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Monitoring/MemoryWatchdog.cs') diff --git a/OpenSim/Framework/Monitoring/MemoryWatchdog.cs b/OpenSim/Framework/Monitoring/MemoryWatchdog.cs index a23cf1f..c6010cd 100644 --- a/OpenSim/Framework/Monitoring/MemoryWatchdog.cs +++ b/OpenSim/Framework/Monitoring/MemoryWatchdog.cs @@ -60,7 +60,7 @@ namespace OpenSim.Framework.Monitoring private static bool m_enabled; /// - /// Average memory churn in bytes per millisecond. + /// Last memory churn in bytes per millisecond. /// public static double AverageMemoryChurn { @@ -68,6 +68,14 @@ namespace OpenSim.Framework.Monitoring } /// + /// Average memory churn in bytes per millisecond. + /// + public static double LastMemoryChurn + { + get { if (m_samples.Count > 0) return m_samples.Last(); else return 0; } + } + + /// /// Maximum number of statistical samples. /// /// -- cgit v1.1