aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-10-16 23:44:52 +0100
committerJustin Clark-Casey (justincc)2012-10-16 23:44:52 +0100
commit4e5b2346a5700b14687a33175ba54a93960a9d33 (patch)
tree00136f0ef3376a29156eb588be731d92eb459a35 /OpenSim
parentAdd optional pool for the UDPPacketBuffer objects that handle all incoming UD... (diff)
downloadopensim-SC_OLD-4e5b2346a5700b14687a33175ba54a93960a9d33.zip
opensim-SC_OLD-4e5b2346a5700b14687a33175ba54a93960a9d33.tar.gz
opensim-SC_OLD-4e5b2346a5700b14687a33175ba54a93960a9d33.tar.bz2
opensim-SC_OLD-4e5b2346a5700b14687a33175ba54a93960a9d33.tar.xz
Add LastMemoryChurn stat using existing data so we can more quickly tell how memory churn changes rather than waiting for the average to move.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Monitoring/BaseStatsCollector.cs6
-rw-r--r--OpenSim/Framework/Monitoring/MemoryWatchdog.cs10
2 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
index 57a63ef..2903b6e 100644
--- a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
@@ -49,7 +49,11 @@ namespace OpenSim.Framework.Monitoring
49 Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); 49 Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
50 50
51 sb.AppendFormat( 51 sb.AppendFormat(
52 "OpenSim object memory churn : {0} MB/s\n", 52 "OpenSim last object memory churn : {0} MB/s\n",
53 Math.Round((MemoryWatchdog.LastMemoryChurn * 1000) / 1024.0 / 1024, 3));
54
55 sb.AppendFormat(
56 "OpenSim average object memory churn : {0} MB/s\n",
53 Math.Round((MemoryWatchdog.AverageMemoryChurn * 1000) / 1024.0 / 1024, 3)); 57 Math.Round((MemoryWatchdog.AverageMemoryChurn * 1000) / 1024.0 / 1024, 3));
54 58
55 sb.AppendFormat( 59 sb.AppendFormat(
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
60 private static bool m_enabled; 60 private static bool m_enabled;
61 61
62 /// <summary> 62 /// <summary>
63 /// Average memory churn in bytes per millisecond. 63 /// Last memory churn in bytes per millisecond.
64 /// </summary> 64 /// </summary>
65 public static double AverageMemoryChurn 65 public static double AverageMemoryChurn
66 { 66 {
@@ -68,6 +68,14 @@ namespace OpenSim.Framework.Monitoring
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// Average memory churn in bytes per millisecond.
72 /// </summary>
73 public static double LastMemoryChurn
74 {
75 get { if (m_samples.Count > 0) return m_samples.Last(); else return 0; }
76 }
77
78 /// <summary>
71 /// Maximum number of statistical samples. 79 /// Maximum number of statistical samples.
72 /// </summary> 80 /// </summary>
73 /// <remarks> 81 /// <remarks>