diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Statistics/BaseStatsCollector.cs | 20 | ||||
-rw-r--r-- | OpenSim/Framework/Watchdog.cs | 3 |
2 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/Framework/Statistics/BaseStatsCollector.cs b/OpenSim/Framework/Statistics/BaseStatsCollector.cs index c9e57ce..28ce650 100644 --- a/OpenSim/Framework/Statistics/BaseStatsCollector.cs +++ b/OpenSim/Framework/Statistics/BaseStatsCollector.cs | |||
@@ -44,14 +44,18 @@ namespace OpenSim.Framework.Statistics | |||
44 | StringBuilder sb = new StringBuilder(Environment.NewLine); | 44 | StringBuilder sb = new StringBuilder(Environment.NewLine); |
45 | sb.Append("MEMORY STATISTICS"); | 45 | sb.Append("MEMORY STATISTICS"); |
46 | sb.Append(Environment.NewLine); | 46 | sb.Append(Environment.NewLine); |
47 | sb.Append( | 47 | |
48 | string.Format( | 48 | sb.AppendFormat( |
49 | "Allocated to OpenSim objects: {0} MB\n", | 49 | "Allocated to OpenSim objects: {0} MB\n", |
50 | Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0))); | 50 | Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); |
51 | sb.Append( | 51 | |
52 | string.Format( | 52 | sb.AppendFormat( |
53 | "Process memory : {0} MB\n", | 53 | "OpenSim object memory churn : {0} KB/s\n", |
54 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0))); | 54 | Math.Round((MemoryWatchdog.AverageMemoryChurn * 1000) / 1024.0 / 1024, 3)); |
55 | |||
56 | sb.AppendFormat( | ||
57 | "Process memory : {0} MB\n", | ||
58 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0)); | ||
55 | 59 | ||
56 | return sb.ToString(); | 60 | return sb.ToString(); |
57 | } | 61 | } |
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs index 8a74f53..54e3d1a 100644 --- a/OpenSim/Framework/Watchdog.cs +++ b/OpenSim/Framework/Watchdog.cs | |||
@@ -325,6 +325,9 @@ namespace OpenSim.Framework | |||
325 | callback(callbackInfo); | 325 | callback(callbackInfo); |
326 | } | 326 | } |
327 | 327 | ||
328 | if (MemoryWatchdog.Enabled) | ||
329 | MemoryWatchdog.Update(); | ||
330 | |||
328 | m_watchdogTimer.Start(); | 331 | m_watchdogTimer.Start(); |
329 | } | 332 | } |
330 | } | 333 | } |