public MemoryProfiler(MemoryCounterType counterType)
        {
            string callingAssemblyName = Assembly.GetEntryAssembly().GetName().Name;

            performanceCounter = new PerformanceCounter(
                                        ".NET CLR Memory",
                                        counterNames[counterType],
                                        callingAssemblyName,
                                        true);

            Reset();
        }
 public static MemoryProfiler StartNew(MemoryCounterType counterType)
 {
     return new MemoryProfiler(counterType);
 }