aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
blob: 88f2938c521b154adda9dbd49081fddf78125cb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;

namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
{
    class PWSMemoryMonitor : IMonitor
    {
        #region Implementation of IMonitor

        public double GetValue()
        {
            return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64;
        }

        public string GetName()
        {
            return "Private Working Set Memory";
        }

        public string GetFriendlyValue()
        {
            return (int)(GetValue() / (1024 * 1024)) + "MB (Global)";
        }

        #endregion
    }
}