public override void Analyse(AMQPQueueMetric current, AMQPQueueMetric previous, ConcurrentBag <AMQPQueueMetric> busyQueues, ConcurrentBag <AMQPQueueMetric> quietQueues, int percentageDifference)
 {
     if (current.ConsumerUtilisation >= 0 && current.ConsumerUtilisation < 99)
     {
         current.AMQPQueueMetricAnalysisResult = AMQPQueueMetricAnalysisResult.ConsumerUtilisationTooLow;
         busyQueues.Add(current);
     }
     else
     {
         analyser.Analyse(current, previous, busyQueues, quietQueues, percentageDifference);
     }
 }
        public override void Analyse(AMQPQueueMetric current, AMQPQueueMetric previous, ConcurrentBag <AMQPQueueMetric> busyQueues, ConcurrentBag <AMQPQueueMetric> quietQueues, int percentageDifference)
        {
            var percentageChange = PercentageChangeCalculator.Calculate(current.DispatchRate, previous.DispatchRate);

            if (percentageChange <= -percentageDifference)
            {
                current.AMQPQueueMetricAnalysisResult = AMQPQueueMetricAnalysisResult.DispatchRateDecreased;
                busyQueues.Add(current);
            }
            else
            {
                analyser.Analyse(current, previous, busyQueues, quietQueues, percentageDifference);
            }
        }
        public override void Analyse(AMQPQueueMetric current, AMQPQueueMetric previous, ConcurrentBag <AMQPQueueMetric> busyQueues, ConcurrentBag <AMQPQueueMetric> quietQueues, int percentageDifference)
        {
            if (current.Length > 100)
            {
                var percentageChange = PercentageChangeCalculator.Calculate(current.Length, previous.Length);

                if (percentageChange >= percentageDifference)
                {
                    current.AMQPQueueMetricAnalysisResult = AMQPQueueMetricAnalysisResult.QueueLengthIncreased;
                    busyQueues.Add(current);
                }
                else
                {
                    analyser.Analyse(current, previous, busyQueues, quietQueues, percentageDifference);
                }
            }
            else
            {
                analyser.Analyse(current, previous, busyQueues, quietQueues, percentageDifference);
            }
        }
Ejemplo n.º 4
0
 public abstract void Analyse(AMQPQueueMetric current, AMQPQueueMetric previous, ConcurrentBag <AMQPQueueMetric> busyQueues, ConcurrentBag <AMQPQueueMetric> quietQueues, int percentageDifference);
 public override void Analyse(AMQPQueueMetric current, AMQPQueueMetric previous, ConcurrentBag <AMQPQueueMetric> busyQueues, ConcurrentBag <AMQPQueueMetric> quietQueues, int percentageDifference)
 {
     quietQueues.Add(current);
     current.AMQPQueueMetricAnalysisResult = AMQPQueueMetricAnalysisResult.Stable;
 }