Пример #1
0
        public void Refresh()
        {
            Max = (long)GetMemory() / 1024;
            var p = Process.GetCurrentProcess();
            Total = p.PrivateMemorySize64 / 1024;
            HeapUse = GC.GetTotalMemory(false) / 1024;
            HeapUnUse = (Total - HeapUse) / 1024;
            Free = (long)_memory.NextValue() / 1024;

            GCInfoList.Clear();
            for (int i = 0; i <= GC.MaxGeneration; i++)
            {
                var gcInfo = new GCInfo();
                gcInfo.Name = "Gen_" + i.ToString();
                var time = GC.CollectionCount(i);
                gcInfo.Count = time - gcCounts[i];
                gcInfo.Time = time;
                gcCounts[i] = time;
            }
        }
Пример #2
0
        public void Refresh()
        {
            Max = (long)GetMemory() / 1024;
            var p = Process.GetCurrentProcess();

            Total     = p.PrivateMemorySize64 / 1024;
            HeapUse   = GC.GetTotalMemory(false) / 1024;
            HeapUnUse = (Total - HeapUse) / 1024;
            Free      = (long)_memory.NextValue() / 1024;

            GCInfoList.Clear();
            for (int i = 0; i <= GC.MaxGeneration; i++)
            {
                var gcInfo = new GCInfo();
                gcInfo.Name = "Gen_" + i.ToString();
                var time = GC.CollectionCount(i);
                gcInfo.Count = time - gcCounts[i];
                gcInfo.Time  = time;
                gcCounts[i]  = time;
            }
        }