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

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

            Reset();
        }
Example #2
0
 public static MemoryProfiler StartNew(MemoryCounterType counterType)
 {
     return new MemoryProfiler(counterType);
 }