Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
"DailyThroughputFromMonitoring": []
}
],
"TotalThroughput": 249,
"TotalQueues": 5,
"IgnoredQueues": [],
"EnvironmentInformation": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ await DataStore.CreateBuilder()
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint1").Throughput, Is.EqualTo(55), $"Incorrect Throughput recorded for Endpoint1");
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint2").Throughput, Is.EqualTo(65), $"Incorrect Throughput recorded for Endpoint2");
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint3").Throughput, Is.EqualTo(75), $"Incorrect Throughput recorded for Endpoint3");
}

using (Assert.EnterMultipleScope())
{
Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(195), $"Incorrect TotalThroughput recorded");
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(3), $"Incorrect TotalQueues recorded");
}
}
Expand Down Expand Up @@ -182,11 +177,6 @@ await DataStore.CreateBuilder()
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint1").Throughput, Is.EqualTo(65), $"Incorrect Throughput recorded for Endpoint1");
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint2").Throughput, Is.EqualTo(65), $"Incorrect Throughput recorded for Endpoint2");
Assert.That(report.ReportData.Queues.First(w => w.QueueName == "Endpoint3").Throughput, Is.EqualTo(57), $"Incorrect Throughput recorded for Endpoint3");
}

using (Assert.EnterMultipleScope())
{
Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(187), $"Incorrect TotalThroughput recorded");
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(3), $"Incorrect TotalQueues recorded");
}
}
Expand All @@ -206,8 +196,6 @@ public async Task Should_return_correct_throughput_in_report_when_endpoint_has_n
using (Assert.EnterMultipleScope())
{
Assert.That(report.ReportData.Queues[0].Throughput, Is.EqualTo(0), $"Incorrect Throughput recorded for {report.ReportData.Queues[0].QueueName}");

Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(0), $"Incorrect TotalThroughput recorded");
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(1), $"Incorrect TotalQueues recorded");
}
}
Expand Down Expand Up @@ -253,7 +241,6 @@ await DataStore.CreateBuilder()
//even though the names are different, we should have matched on the sanitized name and hence displayed max throughput from the 2 endpoints
Assert.That(report.ReportData.Queues[0].Throughput, Is.EqualTo(75), $"Incorrect Throughput recorded for Endpoint1");

Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(75), $"Incorrect TotalThroughput recorded");
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(1), $"Incorrect TotalQueues recorded");
}
}
Expand All @@ -278,12 +265,7 @@ await DataStore.CreateBuilder()
// Assert
Assert.That(report, Is.Not.Null);
Assert.That(report.ReportData.Queues.Count, Is.EqualTo(1));

using (Assert.EnterMultipleScope())
{
Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(75), $"Incorrect TotalThroughput recorded");
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(1), $"Incorrect TotalQueues recorded");
}
Assert.That(report.ReportData.TotalQueues, Is.EqualTo(1), $"Incorrect TotalQueues recorded");
}

[TestCase(ThroughputSource.Audit)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ await DataStore.CreateBuilder()
// Assert
Assert.That(report, Is.Not.Null);
Assert.That(report.ReportData.Queues.Count, Is.EqualTo(1));
//should see 1 endpoint with both throughputs, and return 60 as the maximum one
Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(60));
Assert.That(report.ReportData.Queues.FirstOrDefault(f => f.QueueName == "Endpoint1").DailyThroughputFromAudit.Sum(s => s.MessageCount), Is.EqualTo(60));
Assert.That(report.ReportData.Queues.FirstOrDefault(f => f.QueueName == "Endpoint1").DailyThroughputFromBroker.Sum(s => s.MessageCount), Is.EqualTo(50));
}
Expand Down Expand Up @@ -122,8 +120,6 @@ await DataStore.CreateBuilder()
// Assert
Assert.That(report, Is.Not.Null);
Assert.That(report.ReportData.Queues.Count, Is.EqualTo(2));
//two different endpoints hence total throughput is a sum of both of them
Assert.That(report.ReportData.TotalThroughput, Is.EqualTo(110));
}

class BrokerThroughputQuery_WithLowerCaseSanitizedNameCleanse : IBrokerThroughputQuery
Expand Down
1 change: 0 additions & 1 deletion src/Particular.LicensingComponent/ThroughputCollector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public async Task<SignedReport> GenerateThroughputReport(string spVersion, DateT
IgnoredQueues = [.. ignoredQueueNames],
Queues = [.. queueThroughputs],
TotalQueues = queueThroughputs.Count,
TotalThroughput = queueThroughputs.Sum(q => q.Throughput ?? 0),
EnvironmentInformation = new EnvironmentInformation { AuditServicesData = new AuditServicesData(auditServiceMetadata.Versions, auditServiceMetadata.Transports), EnvironmentData = brokerMetaData.Data }
};

Expand Down
Loading