Beispiel #1
0
 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);
 }
Beispiel #2
0
 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);
 }