diff options
author | UbitUmarov | 2012-07-10 19:13:24 +0100 |
---|---|---|
committer | UbitUmarov | 2012-07-10 19:13:24 +0100 |
commit | b5b763f7e1a7c77239bf9fa9bfaabd0f8daa8a81 (patch) | |
tree | 22f6b663317256e5649f615958640ec0873fce89 /OpenSim/Framework/Statistics | |
parent | console region restart: Let Xengine not cry all over the place with (diff) | |
download | opensim-SC_OLD-b5b763f7e1a7c77239bf9fa9bfaabd0f8daa8a81.zip opensim-SC_OLD-b5b763f7e1a7c77239bf9fa9bfaabd0f8daa8a81.tar.gz opensim-SC_OLD-b5b763f7e1a7c77239bf9fa9bfaabd0f8daa8a81.tar.bz2 opensim-SC_OLD-b5b763f7e1a7c77239bf9fa9bfaabd0f8daa8a81.tar.xz |
add some more memory information to StatsCollector
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r-- | OpenSim/Framework/Statistics/BaseStatsCollector.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Framework/Statistics/BaseStatsCollector.cs b/OpenSim/Framework/Statistics/BaseStatsCollector.cs index c9e57ce..3f918f3 100644 --- a/OpenSim/Framework/Statistics/BaseStatsCollector.cs +++ b/OpenSim/Framework/Statistics/BaseStatsCollector.cs | |||
@@ -48,10 +48,26 @@ namespace OpenSim.Framework.Statistics | |||
48 | string.Format( | 48 | string.Format( |
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 | Process myprocess = Process.GetCurrentProcess(); |
53 | "Process memory : {0} MB\n", | 53 | if (!myprocess.HasExited) |
54 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0))); | 54 | { |
55 | myprocess.Refresh(); | ||
56 | sb.Append( | ||
57 | string.Format( | ||
58 | "Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", | ||
59 | Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0), | ||
60 | Math.Round(Process.GetCurrentProcess().PagedMemorySize64 / 1024.0 / 1024.0), | ||
61 | Math.Round(Process.GetCurrentProcess().VirtualMemorySize64 / 1024.0 / 1024.0))); | ||
62 | sb.Append( | ||
63 | string.Format( | ||
64 | "Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n", | ||
65 | Math.Round(Process.GetCurrentProcess().PeakWorkingSet64 / 1024.0 / 1024.0), | ||
66 | Math.Round(Process.GetCurrentProcess().PeakPagedMemorySize64 / 1024.0 / 1024.0), | ||
67 | Math.Round(Process.GetCurrentProcess().PeakVirtualMemorySize64 / 1024.0 / 1024.0))); | ||
68 | } | ||
69 | else | ||
70 | sb.Append("Process reported as Exited \n"); | ||
55 | 71 | ||
56 | return sb.ToString(); | 72 | return sb.ToString(); |
57 | } | 73 | } |