コード例 #1
0
        private void OnAMQPQueueMetricsAnalysed(AMQPQueueMetricsAnalysedEventArgs e)
        {
            var handler = AMQPQueueMetricsAnalysed;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        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
ファイル: QueueWatch.cs プロジェクト: yonglehou/Daishi.AMQP
 private void OnAMQPQueueMetricsAnalysed(AMQPQueueMetricsAnalysedEventArgs e) {
     var handler = AMQPQueueMetricsAnalysed;
     if (handler != null) handler(this, e);
 }