예제 #1
0
        public PerformanceCounterAccessor(string instanceName)
        {
            this.counters = TaskDistributionFabricPerfCounters.GetInstance(instanceName);
            SlidingTotalCounter counter = new SlidingTotalCounter(PerformanceCounterAccessor.SlidingCounterInterval, PerformanceCounterAccessor.SlidingCounterPrecision);

            this.successfulRequests = new PerformanceCounterAccessor.PeriodicSlidingTotalCounter(PerformanceCounterAccessor.BatchDuration, counter);
            SlidingTotalCounter counter2 = new SlidingTotalCounter(PerformanceCounterAccessor.SlidingCounterInterval, PerformanceCounterAccessor.SlidingCounterPrecision);

            this.failedRequests = new PerformanceCounterAccessor.PeriodicSlidingTotalCounter(PerformanceCounterAccessor.BatchDuration, counter2);
            PercentileCounter counter3 = new PercentileCounter(PerformanceCounterAccessor.PercentileCounterInterval, PerformanceCounterAccessor.PercentileCounterPrecision, 1L, 1000L);

            this.queueLength = new PerformanceCounterAccessor.PeriodicPercentileCounter(PerformanceCounterAccessor.BatchDuration, counter3);
            PercentileCounter counter4 = new PercentileCounter(PerformanceCounterAccessor.PercentileCounterInterval, PerformanceCounterAccessor.PercentileCounterPrecision, 10L, 10000L);

            this.queueLatency = new PerformanceCounterAccessor.PeriodicPercentileCounter(PerformanceCounterAccessor.BatchDuration, counter4);
            PercentileCounter counter5 = new PercentileCounter(PerformanceCounterAccessor.PercentileCounterInterval, PerformanceCounterAccessor.PercentileCounterPrecision, 5L, 5000L);

            this.processorLatency = new PerformanceCounterAccessor.PeriodicPercentileCounter(PerformanceCounterAccessor.BatchDuration, counter5);
        }
예제 #2
0
 public PeriodicSlidingTotalCounter(TimeSpan batchDuration, SlidingTotalCounter counter)
 {
     this.batchDuration = batchDuration;
     this.counter       = counter;
     this.syncObj       = new object();
 }