Calculate TotalThroughput as the maximum organization-wide daily total#5593
Calculate TotalThroughput as the maximum organization-wide daily total#5593rebchr wants to merge 1 commit into
Conversation
The throughput report previously set TotalThroughput to the sum of each endpoint's individual best day. Endpoints that peak on different days were counted as if their peaks occurred on the same day, overstating actual throughput - increasingly so with more queues and longer reporting windows. Per the published definition of daily throughput (maximum number of messages processed by all NServiceBus endpoints across the entire organization in a day), the daily totals must be summed across endpoints first, and the maximum taken over days. When multiple sources report data for the same endpoint and day, the maximum value is used, consistent with the existing per-endpoint MaxDailyThroughput semantics. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks @rebchr, we're reviewing your PR. The |
|
Hi Phil, thanks for the quick response — good to hear the tier calculation is done from the raw daily values on your side, and that it aligns with what this PR does. Since the daily values for queues marked Removing the field entirely would work just as well for us. The reason we care is that the pre-computed total does end up in licensing conversations in practice: during our 2025 renewal the combined reports were quoted to us as "11+ million" throughput, while the actual busiest day computed from the daily values was ~8.4 million. Whichever way it's resolved — corrected or removed — the important thing is that the report no longer presents a total that contradicts the published definition. |
Fixes:
What
TotalThroughputin the throughput report is now the maximum over calendar days of the organization-wide daily total, instead of the sum of each endpoint's individual best day. This matches the published definition of maximum message throughput per day at particular.net/pricing/definitions:Why
The previous calculation (
queueThroughputs.Sum(q => q.Throughput), where each queue'sThroughputis its own peak day) counts every endpoint's peak as if they all occurred on the same day. Unless all endpoints peak simultaneously, this is strictly greater than the actual busiest day, and the overstatement grows with the number of queues and the length of the reporting window. Since the report is used in licensing conversations, the reported number should match the definition it is measured against.Example — two endpoints, two days: A = [100, 10], B = [20, 100]. Previous
TotalThroughput: 200. Actual busiest day: 120.How
DailyThroughput()extension yields an endpoint's per-day values; when multiple sources have data for the same day, the maximum value is used, consistent with the existing per-endpointMaxDailyThroughput()semantics (all sources measure the same messages).GenerateThroughputReportaccumulates daily totals across all endpoints in the existing loop and setsTotalThroughputto the highest daily total (0 when there is no data).Throughputfield is unchanged, soTotalThroughputremains ≥ every per-queue value. The set of queues contributing to the total is also unchanged.All tests in
Particular.LicensingComponent.UnitTestspass (75/75).🤖 Generated with Claude Code