Пример #1
0
        private void OnAMQPQueueMetricsAnalysed(AMQPQueueMetricsAnalysedEventArgs e)
        {
            var handler = AMQPQueueMetricsAnalysed;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        private void QueueWatchOnAMQPQueueMetricsAnalysed(object sender, AMQPQueueMetricsAnalysedEventArgs e) {

            Console.Clear();
            if (e.BusyQueues.Any()) {
                foreach (var busy in e.BusyQueues)
                    Console.WriteLine(string.Concat(busy.QueueName, ": ", busy.AMQPQueueMetricAnalysisResult));
            }
            if (!e.QuietQueues.Any()) return;
            foreach (var quiet in e.QuietQueues)
                Console.WriteLine(string.Concat(quiet.QueueName, ": ", quiet.AMQPQueueMetricAnalysisResult));

            Console.WriteLine("-----");

            int workerThreads, ioThreads;
            ThreadPool.GetAvailableThreads(out workerThreads, out ioThreads);
            Console.WriteLine(string.Concat("Worker Threads: ", workerThreads));
            Console.WriteLine(string.Concat("IO Threads: ", ioThreads));

            Console.WriteLine("-----");
        }
Пример #3
0
 private void OnAMQPQueueMetricsAnalysed(AMQPQueueMetricsAnalysedEventArgs e) {
     var handler = AMQPQueueMetricsAnalysed;
     if (handler != null) handler(this, e);
 }