diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs new file mode 100644 index 0000000..88f2938 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs | |||
@@ -0,0 +1,26 @@ | |||
1 | using System; | ||
2 | |||
3 | namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors | ||
4 | { | ||
5 | class PWSMemoryMonitor : IMonitor | ||
6 | { | ||
7 | #region Implementation of IMonitor | ||
8 | |||
9 | public double GetValue() | ||
10 | { | ||
11 | return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64; | ||
12 | } | ||
13 | |||
14 | public string GetName() | ||
15 | { | ||
16 | return "Private Working Set Memory"; | ||
17 | } | ||
18 | |||
19 | public string GetFriendlyValue() | ||
20 | { | ||
21 | return (int)(GetValue() / (1024 * 1024)) + "MB (Global)"; | ||
22 | } | ||
23 | |||
24 | #endregion | ||
25 | } | ||
26 | } | ||