diff --git a/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/PerformanceMonitors.cs b/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/PerformanceMonitors.cs index a88ca4c..5ad1ae4 100644 --- a/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/PerformanceMonitors.cs +++ b/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/PerformanceMonitors.cs @@ -11,7 +11,7 @@ public class PerformanceMonitors /// We update this value every 1 second. /// public int CpuUsage{ get; private set; } - public int MemoryUsage => ((int) ProcessCtx.WorkingSet64 / (1024 * 1024)); + public int MemoryUsage { get; set; } public bool Running { get; private set; } private Process ProcessCtx { get; set; } public PerformanceMonitors() @@ -34,6 +34,7 @@ private void DoCount() _endTime = DateTime.Now; _endUsage = ProcessCtx.TotalProcessorTime; this.CpuUsage = (int)((((_endUsage - _startUsage).TotalMilliseconds) / (Environment.ProcessorCount * ((_endTime - _startTime).TotalMilliseconds))) * 100); + this.MemoryUsage = (int) ((ProcessCtx.PrivateMemorySize64 / 1024f) / 1024f); } } public void Shutdown() diff --git a/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/WebAPIServer.cs b/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/WebAPIServer.cs index 679c3c3..f6a426a 100644 --- a/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/WebAPIServer.cs +++ b/ImpostorHQ.Command/Impostor.Commands.Core/DashBoard/WebAPIServer.cs @@ -307,7 +307,7 @@ public void DoHeartbeat() Push(String.Empty, string.Empty,Structures.MessageFlag.HeartbeatMessage,CompileNumbers()); } } - Thread.Sleep(5000); + Thread.Sleep(1000); } } diff --git a/Server.Test.rar b/Server.Test.rar new file mode 100644 index 0000000..1321ca9 Binary files /dev/null and b/Server.Test.rar differ