public static PerformanceCounter GetLargeObjectHeap() { if (LargeHeap.IsInstance()) { return(LargeHeap); } LargeHeap = new PerformanceCounter { CategoryName = ".NET CLR Memory", CounterName = "Large Object Heap size", InstanceName = RuntimeHelper.GetProcessName() }; return(LargeHeap); }
public static PerformanceCounter GetTimeInGc() { if (TimeInGc.IsInstance()) { return(TimeInGc); } TimeInGc = new PerformanceCounter { CategoryName = ".NET CLR Memory", CounterName = "% Time in GC", InstanceName = RuntimeHelper.GetProcessName() }; return(TimeInGc); }