Add LastMemoryChurn stat using existing data so we can more quickly tell how memory churn changes rather than waiting for the average to move.

This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-16 23:44:52 +01:00
parent fc861c7904
commit 4e5b2346a5
2 changed files with 14 additions and 2 deletions

View File

@@ -49,7 +49,11 @@ namespace OpenSim.Framework.Monitoring
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
sb.AppendFormat(
"OpenSim object memory churn : {0} MB/s\n",
"OpenSim last object memory churn : {0} MB/s\n",
Math.Round((MemoryWatchdog.LastMemoryChurn * 1000) / 1024.0 / 1024, 3));
sb.AppendFormat(
"OpenSim average object memory churn : {0} MB/s\n",
Math.Round((MemoryWatchdog.AverageMemoryChurn * 1000) / 1024.0 / 1024, 3));
sb.AppendFormat(