Skip to content

Commit d3f439a

Browse files
committed
Formatting
1 parent 9382b05 commit d3f439a

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/ServiceControl.Transports.RabbitMQ/RabbitMQBrokerQueueDetails.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,27 @@
22
namespace ServiceControl.Transports.RabbitMQ;
33

44
using System.Collections.Generic;
5-
using ServiceControl.Transports.BrokerThroughput;
65
using NServiceBus.Transport.RabbitMQ.ManagementApi;
6+
using ServiceControl.Transports.BrokerThroughput;
77

88
class RabbitMQBrokerQueueDetails(Queue queue) : IBrokerQueue
99
{
1010
public string QueueName { get; } = queue.Name;
11+
1112
public string SanitizedName => QueueName;
13+
1214
public string? Scope => null;
13-
//public string VHost { get; } = queue.Vhost;
15+
1416
public List<string> EndpointIndicators { get; } = [];
17+
1518
long? AckedMessages { get; set; } = queue.MessageStats?.Ack;
19+
1620
long Baseline { get; set; } = queue.MessageStats?.Ack ?? 0;
1721

1822
public long CalculateThroughputFrom(RabbitMQBrokerQueueDetails newReading)
1923
{
2024
var newlyAckedMessages = 0L;
25+
2126
if (newReading.AckedMessages is null)
2227
{
2328
return newlyAckedMessages;
@@ -28,6 +33,7 @@ public long CalculateThroughputFrom(RabbitMQBrokerQueueDetails newReading)
2833
newlyAckedMessages = newReading.AckedMessages.Value - Baseline;
2934
AckedMessages += newlyAckedMessages;
3035
}
36+
3137
Baseline = newReading.AckedMessages.Value;
3238

3339
return newlyAckedMessages;

src/ServiceControl.Transports/BrokerThroughput/IBrokerQueue.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ namespace ServiceControl.Transports.BrokerThroughput;
77
public interface IBrokerQueue
88
#pragma warning restore CA1711
99
{
10-
public string QueueName { get; }
11-
public string SanitizedName { get; }
12-
public string? Scope { get; }
13-
public List<string> EndpointIndicators { get; }
10+
string QueueName { get; }
11+
12+
string SanitizedName { get; }
13+
14+
string? Scope { get; }
15+
16+
List<string> EndpointIndicators { get; }
1417
}

0 commit comments

Comments
 (0)