mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
cosmetics
This commit is contained in:
@@ -52,21 +52,21 @@ namespace OpenSim.Framework.Monitoring
|
||||
Math.Round((MemoryWatchdog.LastHeapAllocationRate * 1000) / 1048576.0, 3),
|
||||
Math.Round((MemoryWatchdog.AverageHeapAllocationRate * 1000) / 1048576.0, 3));
|
||||
|
||||
Process myprocess = Process.GetCurrentProcess();
|
||||
// if (!myprocess.HasExited)
|
||||
try
|
||||
{
|
||||
myprocess.Refresh();
|
||||
sb.AppendFormat(
|
||||
"Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||
Math.Round(myprocess.WorkingSet64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PagedMemorySize64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.VirtualMemorySize64 / 1024.0 / 1024.0));
|
||||
sb.AppendFormat(
|
||||
"Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||
Math.Round(myprocess.PeakWorkingSet64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PeakPagedMemorySize64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PeakVirtualMemorySize64 / 1024.0 / 1024.0));
|
||||
using (Process myprocess = Process.GetCurrentProcess())
|
||||
{
|
||||
sb.AppendFormat(
|
||||
"Process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||
Math.Round(myprocess.WorkingSet64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PagedMemorySize64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.VirtualMemorySize64 / 1024.0 / 1024.0));
|
||||
sb.AppendFormat(
|
||||
"Peak process memory: Physical {0} MB \t Paged {1} MB \t Virtual {2} MB\n",
|
||||
Math.Round(myprocess.PeakWorkingSet64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PeakPagedMemorySize64 / 1024.0 / 1024.0),
|
||||
Math.Round(myprocess.PeakVirtualMemorySize64 / 1024.0 / 1024.0));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
Reference in New Issue
Block a user