public void LogMessageBlockProcessed(ComplianceMessage message, string block, long time) { IPerformanceCounterAccessor counter = this.GetCounter(block); if (counter != null) { counter.AddProcessorEvent(ProcessorEvent.EndProcessing); counter.AddProcessingCompletionEvent(ExceptionHandler.IsFaulted(message) ? ProcessingCompletionEvent.Failure : ProcessingCompletionEvent.Success, time); } }
public void LogMessageReceived(ComplianceMessage message) { message.ProtocolContext.QueueStartTime = new DateTime?(DateTime.UtcNow); IPerformanceCounterAccessor counter = this.GetCounter(message.ComplianceMessageType.ToString()); if (counter != null) { counter.AddQueueEvent(QueueEvent.Enqueue); } }
public void LogMessageBlockProcessing(ComplianceMessage message, string block) { if (message.ProtocolContext.QueueEndTime == null) { this.LogMessageProcessing(message); } IPerformanceCounterAccessor counter = this.GetCounter(block); if (counter != null) { counter.AddProcessorEvent(ProcessorEvent.StartProcessing); } }
public void LogMessageProcessing(ComplianceMessage message) { message.ProtocolContext.QueueEndTime = new DateTime?(DateTime.UtcNow); message.ProtocolContext.ProcessStartTime = new DateTime?(DateTime.UtcNow); IPerformanceCounterAccessor counter = this.GetCounter(message.ComplianceMessageType.ToString()); if (counter != null) { long latency = 0L; if (message.ProtocolContext.QueueStartTime != null && message.ProtocolContext.QueueEndTime != null) { latency = (long)(message.ProtocolContext.QueueEndTime.Value - message.ProtocolContext.QueueStartTime.Value).TotalMilliseconds; } counter.AddDequeueLatency(latency); counter.AddQueueEvent(QueueEvent.Dequeue); counter.AddProcessorEvent(ProcessorEvent.StartProcessing); } }
public void LogMessageProcessed(ComplianceMessage message) { message.ProtocolContext.ProcessEndTime = new DateTime?(DateTime.UtcNow); IPerformanceCounterAccessor counter = this.GetCounter(message.ComplianceMessageType.ToString()); if (counter != null) { long latency = 0L; if (message.ProtocolContext.ProcessStartTime != null && message.ProtocolContext.ProcessEndTime != null) { latency = (long)(message.ProtocolContext.ProcessEndTime.Value - message.ProtocolContext.ProcessStartTime.Value).TotalMilliseconds; } counter.AddProcessorEvent(ProcessorEvent.EndProcessing); counter.AddProcessingCompletionEvent(ExceptionHandler.IsFaulted(message) ? ProcessingCompletionEvent.Failure : ProcessingCompletionEvent.Success, latency); } if (message.ProtocolContext.Direction == ProtocolContext.MessageDirection.Return) { ProtocolContext.MessageDirection direction = message.ProtocolContext.Direction; } }