aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Monitoring/BaseStatsCollector.cs')
-rw-r--r--OpenSim/Framework/Monitoring/BaseStatsCollector.cs35
1 files changed, 16 insertions, 19 deletions
diff --git a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
index e513abd..7119964 100644
--- a/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
+++ b/OpenSim/Framework/Monitoring/BaseStatsCollector.cs
@@ -48,28 +48,25 @@ namespace OpenSim.Framework.Monitoring
48 Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)); 48 Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0));
49 49
50 sb.AppendFormat( 50 sb.AppendFormat(
51 "Last heap allocation rate : {0} MB/s\n", 51 "Heap allocation rate (last/avg): {0}/{1}MB/s\n",
52 Math.Round((MemoryWatchdog.LastHeapAllocationRate * 1000) / 1024.0 / 1024, 3)); 52 Math.Round((MemoryWatchdog.LastHeapAllocationRate * 1000) / 1048576.0, 3),
53 Math.Round((MemoryWatchdog.AverageHeapAllocationRate * 1000) / 1048576.0, 3));
53 54
54 sb.AppendFormat(
55 "Average heap allocation rate: {0} MB/s\n",
56 Math.Round((MemoryWatchdog.AverageHeapAllocationRate * 1000) / 1024.0 / 1024, 3));
57
58 Process myprocess = Process.GetCurrentProcess();
59// if (!myprocess.HasExited)
60 try 55 try
61 { 56 {
62 myprocess.Refresh(); 57 using (Process myprocess = Process.GetCurrentProcess())
63 sb.AppendFormat( 58 {
64 "Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", 59 sb.AppendFormat(
65 Math.Round(myprocess.WorkingSet64 / 1024.0 / 1024.0), 60 "Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
66 Math.Round(myprocess.PagedMemorySize64 / 1024.0 / 1024.0), 61 Math.Round(myprocess.WorkingSet64 / 1024.0 / 1024.0),
67 Math.Round(myprocess.VirtualMemorySize64 / 1024.0 / 1024.0)); 62 Math.Round(myprocess.PagedMemorySize64 / 1024.0 / 1024.0),
68 sb.AppendFormat( 63 Math.Round(myprocess.VirtualMemorySize64 / 1024.0 / 1024.0));
69 "Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", 64 sb.AppendFormat(
70 Math.Round(myprocess.PeakWorkingSet64 / 1024.0 / 1024.0), 65 "Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
71 Math.Round(myprocess.PeakPagedMemorySize64 / 1024.0 / 1024.0), 66 Math.Round(myprocess.PeakWorkingSet64 / 1024.0 / 1024.0),
72 Math.Round(myprocess.PeakVirtualMemorySize64 / 1024.0 / 1024.0)); 67 Math.Round(myprocess.PeakPagedMemorySize64 / 1024.0 / 1024.0),
68 Math.Round(myprocess.PeakVirtualMemorySize64 / 1024.0 / 1024.0));
69 }
73 } 70 }
74 catch 71 catch
75 { } 72 { }