Ejemplo n.º 1
0
 IReadOnlyList <NodeSnapshot> GetNodes(SystemOverviewInfo systemOverview, IReadOnlyList <NodeInfo> nodes)
 {
     return(nodes
            .Select(x => new NodeSnapshotImpl(systemOverview, x))
            .Cast <NodeSnapshot>()
            .ToList());
 }
Ejemplo n.º 2
0
 public BrokerQueuesSnapshotImpl(SystemOverviewInfo systemOverview, IReadOnlyList <QueueInfo> queues)
 {
     ClusterName = systemOverview.ClusterName;
     Churn       = new BrokerQueueChurnMetricsImpl(systemOverview.MessageStats, systemOverview.QueueStats);
     Queues      = queues
                   .Select(x => new QueueSnapshotImpl(x))
                   .Cast <QueueSnapshot>()
                   .ToList();
 }
Ejemplo n.º 3
0
 public BrokerRuntimeSnapshotImpl(SystemOverviewInfo systemOverview, NodeInfo node)
 {
     ClusterIdentifier = systemOverview.ClusterName;
     Identifier        = node.Name;
     Version           = systemOverview.ErlangVersion;
     Processes         = new RuntimeProcessChurnMetricsImpl(node.TotalProcesses, node.ProcessesUsed, node.ProcessUsageDetails?.Value ?? 0);
     Database          = new RuntimeDatabaseImpl(node);
     GC = new GarbageCollectionImpl(node);
 }
Ejemplo n.º 4
0
 public BrokerConnectivitySnapshotImpl(SystemOverviewInfo systemOverview, IReadOnlyList <ConnectionInfo> connections,
                                       IReadOnlyList <ChannelInfo> channels)
 {
     ClusterName        = systemOverview.ClusterName;
     BrokerVersion      = systemOverview.RabbitMqVersion;
     ChannelsClosed     = new ChurnMetricsImpl(systemOverview.ChurnRates?.TotalChannelsClosed ?? 0, systemOverview.ChurnRates?.ClosedChannelDetails?.Value ?? 0);
     ChannelsCreated    = new ChurnMetricsImpl(systemOverview.ChurnRates?.TotalChannelsCreated ?? 0, systemOverview.ChurnRates?.CreatedChannelDetails?.Value ?? 0);
     ConnectionsCreated = new ChurnMetricsImpl(systemOverview.ChurnRates?.TotalConnectionsCreated ?? 0, systemOverview.ChurnRates?.CreatedConnectionDetails?.Value ?? 0);
     ConnectionsClosed  = new ChurnMetricsImpl(systemOverview.ChurnRates?.TotalConnectionsClosed ?? 0, systemOverview.ChurnRates?.ClosedConnectionDetails?.Value ?? 0);
     Connections        = connections
                          .Select(x => new ConnectionSnapshotImpl(x, channels.FilterByConnection(x.Name)))
                          .Cast <ConnectionSnapshot>()
                          .ToList();
 }
Ejemplo n.º 5
0
 public NodeSnapshotImpl(SystemOverviewInfo systemOverview, NodeInfo node)
 {
     Identifier        = node.Name;
     Uptime            = node.Uptime;
     ClusterIdentifier = systemOverview.ClusterName;
     OS                     = new OperatingSystemSnapshotImpl(node);
     Runtime                = new BrokerRuntimeSnapshotImpl(systemOverview, node);
     ContextSwitching       = new ContextSwitchDetailsImpl(node);
     Disk                   = new DiskSnapshotImpl(node);
     NetworkPartitions      = node.Partitions.ToList();
     AvailableCoresDetected = node.AvailableCoresDetected;
     Memory                 = new MemorySnapshotImpl(node);
     IsRunning              = node.IsRunning;
     InterNodeHeartbeat     = node.NetworkTickTime;
 }
Ejemplo n.º 6
0
 NodeSnapshot MapNodeSnapshot(SystemOverviewInfo systemOverview, NodeInfo node) =>
Ejemplo n.º 7
0
 public ClusterSnapshotImpl(SystemOverviewInfo systemOverview, IReadOnlyList <NodeInfo> nodes)
 {
     ClusterName   = systemOverview.ClusterName;
     BrokerVersion = systemOverview.RabbitMqVersion;
     Nodes         = GetNodes(systemOverview, nodes);
 }