public CollectorEngine(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader) { _performanceCounterGroup = performanceCounterGroup; _sendBusiness = sendBusiness; _tags = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray(); if (performanceCounterGroup.SecondsInterval > 0) { _timer = new Timer(1000 * performanceCounterGroup.SecondsInterval); _timer.Elapsed += Elapsed; } _name = _performanceCounterGroup.Name; }
public PublisherEngine(ICounterPublisher counterPublisher, ISendBusiness sendBusiness, ITagLoader tagLoader) { _counterPublisher = counterPublisher; _sendBusiness = sendBusiness; _tags = tagLoader.GetGlobalTags(); //.Union(_performanceCounterGroup.Tags).ToArray(); if (counterPublisher.SecondsInterval > 0) { _timer = new Timer(1000 * counterPublisher.SecondsInterval); _timer.Elapsed += Elapsed; } _perfCounter = SetupCategory(); //_perfCounter = new PerformanceCounter(_counterPublisher.CategoryName, _counterPublisher.CounterName, false) { RawValue = _counterPublisher.GetValue() }; }
public PublisherEngine(ICounterPublisher counterPublisher, ISendBusiness sendBusiness, ITagLoader tagLoader) { _counterPublisher = counterPublisher; _sendBusiness = sendBusiness; _tags = tagLoader.GetGlobalTags(); //.Union(_performanceCounterGroup.Tags).ToArray(); if (counterPublisher.SecondsInterval > 0) { _timer = new Timer(1000 * counterPublisher.SecondsInterval); _timer.Elapsed += Elapsed; } _perfCounter = SetupCategory(); //_perfCounter = new PerformanceCounter(_counterPublisher.CategoryName, _counterPublisher.CounterName, false) { RawValue = _counterPublisher.GetValue() }; }
protected CollectorEngineBase(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata) { _engineName = GetType().Name; _performanceCounterGroup = performanceCounterGroup; _name = _performanceCounterGroup.Name; _sendBusiness = sendBusiness; _tags = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray(); if (performanceCounterGroup.SecondsInterval > 0) { _timer = new Timer(1000 * performanceCounterGroup.SecondsInterval); _timer.Elapsed += Elapsed; } _metadata = metadata; }
protected CollectorEngineBase(IPerformanceCounterGroup performanceCounterGroup, ISendBusiness sendBusiness, ITagLoader tagLoader, bool metadata) { _engineName = GetType().Name; _performanceCounterGroup = performanceCounterGroup; _name = _performanceCounterGroup.Name; _sendBusiness = sendBusiness; _tags = tagLoader.GetGlobalTags().Union(_performanceCounterGroup.Tags).ToArray(); if (performanceCounterGroup.SecondsInterval > 0) { _timer = new Timer(1000 * performanceCounterGroup.SecondsInterval); _timer.Elapsed += Elapsed; } _metadata = metadata; }