예제 #1
0
        public override void RunTask()
        {
            double cpu    = GetCPU();
            double memory = GetMemory();

            if (telemetry != null)
            {
                telemetry.Collect(new HardwareUsage(cpu, memory, coreServer.CurrentThreadsCount()));
            }
        }
예제 #2
0
        public void ReleaseMemory()
        {
            int retrieves = 0;

            while (coreServer.CurrentThreadsCount() > 0 && retrieves < 3)
            {
                Thread.Sleep(1000);
                retrieves += 1;
            }

            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();
        }
예제 #3
0
 public int CurrentThreadsCount()
 {
     return(realServer.CurrentThreadsCount());
 }