Example #1
0
        public static Counter Create(string counterName, string counterHelp)
        {
            Counter counter = new Counter(null, PerformanceCounters.GetInstanceName(), counterName);

            PerformanceCounters.counters.Add(counter);
            CounterCreationData value = new CounterCreationData(counterName, counterHelp, PerformanceCounterType.NumberOfItems32);

            PerformanceCounters.countersData.Add(value);
            return(counter);
        }