Add process working memory to "show stats" memory statistics.

This shows the actual amount of RAM being taken up by OpenSimulator (objects + vm overhead)
This commit is contained in:
Justin Clark-Casey (justincc)
2012-03-16 02:43:33 +00:00
parent 78e992dbd0
commit 421b562a04
2 changed files with 11 additions and 4 deletions

View File

@@ -26,8 +26,8 @@
*/
using System;
using System.Diagnostics;
using System.Text;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
@@ -46,8 +46,12 @@ namespace OpenSim.Framework.Statistics
sb.Append(Environment.NewLine);
sb.Append(
string.Format(
"Allocated to OpenSim : {0} MB" + Environment.NewLine,
"Allocated to OpenSim objects: {0} MB\n",
Math.Round(GC.GetTotalMemory(false) / 1024.0 / 1024.0)));
sb.Append(
string.Format(
"Process memory : {0} MB\n",
Math.Round(Process.GetCurrentProcess().WorkingSet64 / 1024.0 / 1024.0)));
return sb.ToString();
}