Calculate TotalThroughput as the maximum organization-wide daily total#5593
Open
rebchr wants to merge 1 commit into
Open
Calculate TotalThroughput as the maximum organization-wide daily total#5593rebchr wants to merge 1 commit into
rebchr 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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