Skip to content

Do not return negative throughput when queue table deleted#5404

Merged
mikeminutillo merged 1 commit intomasterfrom
fix-negative-throughput-when-queue-deleted
Apr 15, 2026
Merged

Do not return negative throughput when queue table deleted#5404
mikeminutillo merged 1 commit intomasterfrom
fix-negative-throughput-when-queue-deleted

Conversation

@mikeminutillo
Copy link
Copy Markdown
Member

@mikeminutillo mikeminutillo commented Mar 27, 2026

While calculating throughput, when a queue table is deleted, we see a negative throughput entry recorded in the usage report for the day.

This happens because we take two snapshots, an hour apart, and then this to figure out how many messages have been processed:

totalThroughputForHour = totalMessagesEndOfHour - totalMessagesStartOfHour

When a table gets deleted, we do not set the totalMessagesEndOfHour which results in the default value of zero. This ends up looking like this:

totalThroughputForHour = 0 - totalMessagesStartOfHour

That is always going to be a negative number, and one that is not representative of the throughput in that hour.

@mikeminutillo mikeminutillo self-assigned this Mar 27, 2026
@mikeminutillo
Copy link
Copy Markdown
Member Author

This is in alignment with how the Endpoint Throughput Counter tool does it.

Copy link
Copy Markdown
Member

@johnsimons johnsimons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikeminutillo mikeminutillo added this to the vNext milestone Apr 15, 2026
@mikeminutillo mikeminutillo merged commit 9fa1373 into master Apr 15, 2026
32 checks passed
@mikeminutillo mikeminutillo deleted the fix-negative-throughput-when-queue-deleted branch April 15, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants