private static PerformanceCounter createCounter( string COUNTER_NAME, string COUNTER_HELP, string instanceName ) { PerformanceCounter counter = null; PerformanceMonitorHelper.createCounter( PerformanceMonitorHelper.WBX_CATEGORY_NAME, PerformanceMonitorHelper.WBX_CATEGORY_NAME, PerformanceCounterCategoryType.MultiInstance, COUNTER_NAME, COUNTER_HELP, PerformanceCounterType.NumberOfItems64 ); counter = PerformanceMonitorHelper.getCounter( PerformanceMonitorHelper.WBX_CATEGORY_NAME, COUNTER_NAME, instanceName, PerformanceCounterInstanceLifetime.Process, false ); return(counter); }