Provides basic functionality for performance counters managers More...
Public Member Functions | |
PerfCounterManagerBase () | |
No direct calls to ctor from non-inherited classes. Use GlobalInstance or GetInstance(string). we can't use private ctor More... | |
Static Public Member Functions | |
static T | GetInstance (string instanceName) |
Get and create (if not exist) counters for instance More... | |
static void | Initialize (object state=null) |
Initialize counters synchronously More... | |
static void | InitializeAsync (string instanceName=null) |
Initialize counters asynchronously. To wait for init complete call WaitForInitializationComplete(int) More... | |
static bool | WaitForInitializationComplete (int timeout) |
Protected Member Functions | |
void | InitializeGlobal (object state) |
Initialize global instance More... | |
void | InitializeInstance (string instanceName) |
Initialize specific instance More... | |
virtual IList< ICounterProvider > | GetCustomCounterProviders () |
Return list of instances of classes that provides ICounterProvider implementations More... | |
PerformanceCounterCategory | GetOrCreateCategory (string categoryName, CounterCreationDataCollection counterCreationData, CountersPermissionLevels permissionLevel) |
Get or create windows performance counter category. More... | |
Static Protected Member Functions | |
static void | InitializeWithDefaults () |
Dummy method to initiate static ctor More... | |
static bool | ValidateCategory (PerformanceCounterCategory category, CounterCreationDataCollection counterCreationData) |
Detects if existing category contains all required counters More... | |
Static Protected Attributes | |
static readonly ILogger | Log = LogManager.GetLogger(typeof(T).FullName) |
static readonly Dictionary< string, T > | Instances = new Dictionary<string, T>() |
static readonly Dictionary< Type, ICounterProvider > | CounterProviders = new Dictionary<Type, ICounterProvider>() |
Properties | |
static bool | isInitialized [get] |
static T | GlobalInstance [get] |
Global instance. Must be initialized before first call More... | |
Provides basic functionality for performance counters managers
T | Child class |
T | : | PerfCounterManagerBase<T> | |
T | : | new() |
|
inline |
No direct calls to ctor from non-inherited classes. Use GlobalInstance or GetInstance(string). we can't use private ctor
|
inlineprotectedvirtual |
Return list of instances of classes that provides ICounterProvider implementations
|
inlinestatic |
Get and create (if not exist) counters for instance
instanceName |
|
inlineprotected |
Get or create windows performance counter category.
categoryName | |
counterCreationData | Should contain list of counters that will be added to this category |
permissionLevel | Level of user permission relative to perf counters stuff |
|
inlinestatic |
Initialize counters synchronously
|
inlinestatic |
Initialize counters asynchronously. To wait for init complete call WaitForInitializationComplete(int)
|
inlineprotected |
Initialize global instance
|
inlineprotected |
Initialize specific instance
instanceName |
|
inlinestaticprotected |
Dummy method to initiate static ctor
|
inlinestaticprotected |
Detects if existing category contains all required counters
category | |
counterCreationData |
|
inlinestatic |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticget |
Global instance. Must be initialized before first call
|
staticget |