// constructors
 public PerformanceCounterListener(string applicationName)
 {
     _applicationName         = applicationName;
     _packages                = new ConcurrentDictionary <string, PerformanceCounterPackage>();
     _appPackage              = GetAppPackage();
     _connectionRecorders     = new ConcurrentDictionary <ConnectionId, ConnectionPerformanceRecorder>();
     _connectionPoolRecorders = new ConcurrentDictionary <ServerId, ConnectionPoolPerformanceRecorder>();
 }
 // constructors
 /// <summary>
 /// Initializes a new instance of the <see cref="PerformanceCounterEventSubscriber"/> class.
 /// </summary>
 /// <param name="applicationName">The name of the application.</param>
 public PerformanceCounterEventSubscriber(string applicationName)
 {
     _applicationName         = applicationName;
     _packages                = new ConcurrentDictionary <string, PerformanceCounterPackage>();
     _appPackage              = GetAppPackage();
     _connectionRecorders     = new ConcurrentDictionary <ConnectionId, ConnectionPerformanceRecorder>();
     _connectionPoolRecorders = new ConcurrentDictionary <ServerId, ConnectionPoolPerformanceRecorder>();
     _subscriber              = new ReflectionEventSubscriber(this, bindingFlags: BindingFlags.Instance | BindingFlags.NonPublic);
 }
Esempio n. 3
0
 // constructors
 public ConnectionPoolPerformanceRecorder(int maxSize, PerformanceCounterPackage appPackage, PerformanceCounterPackage serverPackage)
 {
     _maxSize       = maxSize;
     _appPackage    = appPackage;
     _serverPackage = serverPackage;
 }
 //static
 /// <summary>
 /// Installs the performance counters.
 /// </summary>
 public static void InstallPerformanceCounters()
 {
     PerformanceCounterPackage.Install();
 }
 // constructors
 public ConnectionPoolPerformanceRecorder(int maxSize, PerformanceCounterPackage appPackage, PerformanceCounterPackage serverPackage)
 {
     _maxSize = maxSize;
     _appPackage = appPackage;
     _serverPackage = serverPackage;
 }