diff options
Diffstat (limited to 'OpenSim/Framework/Monitoring/BaseStatsCollector.cs')
-rw-r--r-- | OpenSim/Framework/Monitoring/BaseStatsCollector.cs | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs index 446e3c0..9ee0876 100644 --- a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs | |||
@@ -43,32 +43,27 @@ namespace OpenSim.Framework.Monitoring | |||
43 | StringBuilder sb = new StringBuilder(Environment.NewLine); | 43 | StringBuilder sb = new StringBuilder(Environment.NewLine); |
44 | sb.Append("MEMORY STATISTICS"); | 44 | sb.Append("MEMORY STATISTICS"); |
45 | sb.Append(Environment.NewLine); | 45 | sb.Append(Environment.NewLine); |
46 | sb.AppendFormat( | 46 | sb.Append( |
47 | string.Format( | ||
47 | "Allocated to OpenSim objects: {0} MB\n", | 48 | "Allocated to OpenSim objects: {0} MB\n", |
48 | Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); | 49 | Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0))); |
49 | |||
50 | sb.AppendFormat( | ||
51 | "OpenSim last object memory churn : {0} MB/s\n", | ||
52 | Math.Round((MemoryWatchdog.LastMemoryChurn * 1000) / 1024.0 / 1024, 3)); | ||
53 | |||
54 | sb.AppendFormat( | ||
55 | "OpenSim average object memory churn : {0} MB/s\n", | ||
56 | Math.Round((MemoryWatchdog.AverageMemoryChurn * 1000) / 1024.0 / 1024, 3)); | ||
57 | 50 | ||
58 | Process myprocess = Process.GetCurrentProcess(); | 51 | Process myprocess = Process.GetCurrentProcess(); |
59 | if (!myprocess.HasExited) | 52 | if (!myprocess.HasExited) |
60 | { | 53 | { |
61 | myprocess.Refresh(); | 54 | myprocess.Refresh(); |
62 | sb.AppendFormat( | 55 | sb.Append( |
56 | string.Format( | ||
63 | "Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", | 57 | "Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", |
64 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0), | 58 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0), |
65 | Math.Round(Process.GetCurrentProcess().PagedMemorySize64 / 1024.0 / 1024.0), | 59 | Math.Round(Process.GetCurrentProcess().PagedMemorySize64 / 1024.0 / 1024.0), |
66 | Math.Round(Process.GetCurrentProcess().VirtualMemorySize64 / 1024.0 / 1024.0)); | 60 | Math.Round(Process.GetCurrentProcess().VirtualMemorySize64 / 1024.0 / 1024.0))); |
67 | sb.AppendFormat( | 61 | sb.Append( |
62 | string.Format( | ||
68 | "Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", | 63 | "Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", |
69 | Math.Round(Process.GetCurrentProcess().PeakWorkingSet64 / 1024.0 / 1024.0), | 64 | Math.Round(Process.GetCurrentProcess().PeakWorkingSet64 / 1024.0 / 1024.0), |
70 | Math.Round(Process.GetCurrentProcess().PeakPagedMemorySize64 / 1024.0 / 1024.0), | 65 | Math.Round(Process.GetCurrentProcess().PeakPagedMemorySize64 / 1024.0 / 1024.0), |
71 | Math.Round(Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024.0 / 1024.0)); | 66 | Math.Round(Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024.0 / 1024.0))); |
72 | } | 67 | } |
73 | else | 68 | else |
74 | sb.Append("Process reported as Exited \n"); | 69 | sb.Append("Process reported as Exited \n"); |