Skip to content

TotalThroughput in the throughput report is the sum of per-endpoint peaks, not the peak daily total #5592

Closed

Description

@rebchr

Describe the bug

Description

The throughput report generated by the licensing component reports a TotalThroughput that does not match the published definition of daily throughput. The pricing definitions page defines maximum message throughput per day as:

The maximum number of messages processed by all NServiceBus endpoints across the entire organization in a day.

That is: for each calendar day, sum the messages processed by all endpoints, then take the day with the highest total.

However, GenerateThroughputReport in src/Particular.LicensingComponent/ThroughputCollector.cs computes it the other way around: it first takes each endpoint's best single day (Throughput = endpointData.ThroughputData.MaxDailyThroughput()) and then sums those per-endpoint peaks (TotalThroughput = queueThroughputs.Sum(q => q.Throughput ?? 0)).

Unless every endpoint happens to peak on the same day, the sum of per-endpoint maxima is strictly greater than the maximum daily total. The more queues a system has and the longer the reporting window, the larger the overstatement — for a system with hundreds of queues reporting over many months, TotalThroughput can overstate the actual peak day severalfold. Since this report is used in licensing/tier conversations, the overstatement directly affects customers.

Example

Two endpoints, two days:

Day 1 Day 2 Endpoint max
Endpoint A 100 10 100
Endpoint B 20 100 100
Daily total 120 110
  • Reported TotalThroughput today: 100 + 100 = 200
  • Per the published definition: max(120, 110) = 120

Expected behavior

TotalThroughput equals the maximum over calendar days of the organization-wide daily sum, matching the published definition.

Versions

Observed in ServiceControl 6.18.0 (current master behaves the same; the unit test Should_return_correct_throughput_in_report_when_data_only_from_one_source encodes the sum-of-maxima expectation).

Additional context

I have a fix ready and will open a PR referencing this issue.

Activity

  1. PhilBastian commented on Jul 15, 2026

    @PhilBastian
    Contributor

    After some investigation we've discovered that this field, although it's inaccurate in its calculation, is not used as part of licensing. This is because this calculation includes all queues found on the broker, not just the ones which are involved in the NServiceBus system and contribute to endpoints where the throughput is counted for licensing purposes, unless the user has gone to the effort to mark each queue as "NotNServiceBus".

    We will raise a separate PR to remove this field entirely, and also remove it from the output of the throughput counter tool

  2. mikeminutillo commented on Sep 2, 2026

    @mikeminutillo
    Member

    This will be adressed in ServiceControl 6.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions