Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PipelineElementDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Pipeline element ID.</param>
 /// <param name="name">Pipeline element name.</param>
 /// <param name="typeName">Pipeline element type name.</param>
 /// <param name="kind">Pipeline element kind.</param>
 /// <param name="isRunning">Whether the pipeline element is running (after started, before stopped).</param>
 /// <param name="finalized">Whether the pipeline element is finalized.</param>
 /// <param name="diagnosticState">Diagnostic state for the pipeline element.</param>
 /// <param name="pipelineId">ID of pipeline to which this element belongs.</param>
 /// <param name="emitters">Pipeline element emitters.</param>
 /// <param name="receivers">Pipeline element receivers.</param>
 /// <param name="representsSubpipeline">Pipeline which this element represents (e.g. Subpipeline).</param>
 /// <param name="connectorBridgeToPipelineElement">Bridge to pipeline element in another pipeline (e.g. Connectors).</param>
 public PipelineElementDiagnostics(
     int id,
     string name,
     string typeName,
     PipelineElementKind kind,
     bool isRunning,
     bool finalized,
     string diagnosticState,
     int pipelineId,
     EmitterDiagnostics[] emitters,
     ReceiverDiagnostics[] receivers,
     PipelineDiagnostics representsSubpipeline,
     PipelineElementDiagnostics connectorBridgeToPipelineElement)
 {
     this.Id                               = id;
     this.Name                             = name;
     this.TypeName                         = typeName;
     this.Kind                             = kind;
     this.IsRunning                        = isRunning;
     this.Finalized                        = finalized;
     this.DiagnosticState                  = diagnosticState;
     this.PipelineId                       = pipelineId;
     this.Emitters                         = emitters;
     this.Receivers                        = receivers;
     this.RepresentsSubpipeline            = representsSubpipeline;
     this.ConnectorBridgeToPipelineElement = connectorBridgeToPipelineElement;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EmitterDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Emitter ID.</param>
 /// <param name="name">Emitter name.</param>
 /// <param name="type">Emitter type.</param>
 /// <param name="element">Pipeline element to which emitter belongs.</param>
 public EmitterDiagnostics(int id, string name, string type, PipelineElementDiagnostics element)
 {
     this.Id              = id;
     this.Name            = name;
     this.Type            = type;
     this.PipelineElement = element;
     this.Targets         = new ConcurrentDictionary <int, ReceiverDiagnostics>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReceiverDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Receiver ID.</param>
 /// <param name="name">Receiver name.</param>
 /// <param name="type">Receiver type.</param>
 /// <param name="pipelineElement">Pipeline element to which receiver belongs.</param>
 public ReceiverDiagnostics(int id, string name, string type, PipelineElementDiagnostics pipelineElement)
 {
     this.Id              = id;
     this.Name            = name;
     this.Type            = type;
     this.PipelineElement = pipelineElement;
     this.MessageLatencyAtEmitterHistory  = new Queue <TimeSpan>();
     this.MessageLatencyAtReceiverHistory = new Queue <TimeSpan>();
     this.ProcessingTimeHistory           = new Queue <TimeSpan>();
     this.MessageSizeHistory = new Queue <int>();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReceiverDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Receiver ID.</param>
 /// <param name="receiverName">Receiver name.</param>
 /// <param name="deliveryPolicyName">Name of delivery policy used by receiver.</param>
 /// <param name="typeName">Receiver type name.</param>
 /// <param name="receiverIsThrottled">Whether receiver is throttled.</param>
 /// <param name="lastDeliveryQueueSize">Delivery queue size at last message.</param>
 /// <param name="avgDeliveryQueueSize">Average delivery queue size.</param>
 /// <param name="totalMessageEmittedCount">Total count of emitted messages.</param>
 /// <param name="windowMessageEmittedCount">Count of emitted messages in last averaging time window.</param>
 /// <param name="totalMessageProcessedCount">Total count of processed messages.</param>
 /// <param name="windowMessageProcessedCount">Count of processed messages in last averaging time window.</param>
 /// <param name="totalMessageDroppedCount">Total count of dropped messages.</param>
 /// <param name="windowMessageDroppedCount">Count of dropped messages in last averaging time window.</param>
 /// <param name="lastMessageCreatedLatency">Latency with which the last message was created.</param>
 /// <param name="avgMessageCreatedLatency">Average message created latency in last averaging time window.</param>
 /// <param name="lastMessageEmittedLatency">Latency with which the last message was emitted.</param>
 /// <param name="avgMessageEmittedLatency">Average message emitted latency in last averaging time window.</param>
 /// <param name="lastMessageReceivedLatency">Latency with which the last message was received.</param>
 /// <param name="avgMessageReceivedLatency">Average message received latency in last averaging time window.</param>
 /// <param name="lastMessageProcessTime">Receiver processing time for the last message.</param>
 /// <param name="avgMessageProcessTime">Average receiver processing time in last averaging time window.</param>
 /// <param name="lastMessageSize">Message size for the last message.</param>
 /// <param name="avgMessageSize">Average message size over in last averaging time window.</param>
 /// <param name="pipelineElement">Pipeline element to which emitter belongs.</param>
 /// <param name="source">Receiver's source emitter.</param>
 public ReceiverDiagnostics(
     int id,
     string receiverName,
     string deliveryPolicyName,
     string typeName,
     bool receiverIsThrottled,
     double lastDeliveryQueueSize,
     double avgDeliveryQueueSize,
     int totalMessageEmittedCount,
     int windowMessageEmittedCount,
     int totalMessageProcessedCount,
     int windowMessageProcessedCount,
     int totalMessageDroppedCount,
     int windowMessageDroppedCount,
     double lastMessageCreatedLatency,
     double avgMessageCreatedLatency,
     double lastMessageEmittedLatency,
     double avgMessageEmittedLatency,
     double lastMessageReceivedLatency,
     double avgMessageReceivedLatency,
     double lastMessageProcessTime,
     double avgMessageProcessTime,
     double lastMessageSize,
     double avgMessageSize,
     PipelineElementDiagnostics pipelineElement,
     EmitterDiagnostics source)
 {
     this.Id                          = id;
     this.ReceiverName                = receiverName;
     this.DeliveryPolicyName          = deliveryPolicyName;
     this.TypeName                    = typeName;
     this.ReceiverIsThrottled         = receiverIsThrottled;
     this.LastDeliveryQueueSize       = lastDeliveryQueueSize;
     this.AvgDeliveryQueueSize        = avgDeliveryQueueSize;
     this.TotalMessageEmittedCount    = totalMessageEmittedCount;
     this.WindowMessageEmittedCount   = windowMessageEmittedCount;
     this.TotalMessageProcessedCount  = totalMessageProcessedCount;
     this.WindowMessageProcessedCount = windowMessageProcessedCount;
     this.TotalMessageDroppedCount    = totalMessageDroppedCount;
     this.WindowMessageDroppedCount   = windowMessageDroppedCount;
     this.LastMessageCreatedLatency   = lastMessageCreatedLatency;
     this.AvgMessageCreatedLatency    = avgMessageCreatedLatency;
     this.LastMessageEmittedLatency   = lastMessageEmittedLatency;
     this.AvgMessageEmittedLatency    = avgMessageEmittedLatency;
     this.LastMessageReceivedLatency  = lastMessageReceivedLatency;
     this.AvgMessageReceivedLatency   = avgMessageReceivedLatency;
     this.LastMessageProcessTime      = lastMessageProcessTime;
     this.AvgMessageProcessTime       = avgMessageProcessTime;
     this.LastMessageSize             = lastMessageSize;
     this.AvgMessageSize              = avgMessageSize;
     this.PipelineElement             = pipelineElement;
     this.Source                      = source;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EmitterDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Emitter ID.</param>
 /// <param name="name">Emitter name.</param>
 /// <param name="type">Emitter type.</param>
 /// <param name="pipelineElement">Pipeline element to which emitter belongs.</param>
 /// <param name="targets">Emitter target receivers.</param>
 public EmitterDiagnostics(
     int id,
     string name,
     string type,
     PipelineElementDiagnostics pipelineElement,
     ReceiverDiagnostics[] targets)
 {
     this.Id              = id;
     this.Name            = name;
     this.Type            = type;
     this.PipelineElement = pipelineElement;
     this.Targets         = targets;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReceiverDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Receiver ID.</param>
 /// <param name="receiverName">Receiver name.</param>
 /// <param name="typeName">Receiver type.</param>
 /// <param name="pipelineElement">Pipeline element to which receiver belongs.</param>
 public ReceiverDiagnostics(int id, string receiverName, string typeName, PipelineElementDiagnostics pipelineElement)
 {
     this.Id              = id;
     this.ReceiverName    = receiverName;
     this.TypeName        = typeName;
     this.PipelineElement = pipelineElement;
     this.MessageLatencyAtEmitterHistory  = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageLatencyAtReceiverHistory = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.ProcessingTimeHistory           = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageSizeHistory = new ConcurrentQueue <(int, DateTime)>();
     this.DroppedHistory     = new ConcurrentQueue <(int, DateTime)>();
     this.ProcessedHistory   = new ConcurrentQueue <(int, DateTime)>();
     this.QueueSizeHistory   = new ConcurrentQueue <(int, DateTime)>();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReceiverDiagnostics"/> class.
 /// </summary>
 /// <param name="id">Receiver ID.</param>
 /// <param name="receiverName">Receiver name.</param>
 /// <param name="typeName">Receiver type.</param>
 /// <param name="pipelineElement">Pipeline element to which receiver belongs.</param>
 public ReceiverDiagnostics(int id, string receiverName, string typeName, PipelineElementDiagnostics pipelineElement)
 {
     this.Id              = id;
     this.ReceiverName    = receiverName;
     this.TypeName        = typeName;
     this.PipelineElement = pipelineElement;
     this.MessageCreatedLatencyHistory  = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageEmittedLatencyHistory  = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageReceivedLatencyHistory = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageProcessTimeHistory     = new ConcurrentQueue <(TimeSpan, DateTime)>();
     this.MessageSizeHistory            = new ConcurrentQueue <(int, DateTime)>();
     this.MessageDroppedCountHistory    = new ConcurrentQueue <(int, DateTime)>();
     this.MessageProcessedCountHistory  = new ConcurrentQueue <(int, DateTime)>();
     this.MessageEmittedCountHistory    = new ConcurrentQueue <(int, DateTime)>();
     this.DeliveryQueueSizeHistory      = new ConcurrentQueue <(int, DateTime)>();
 }