Skip to content

Do not return negative throughput when queue table deleted#5404

Open
mikeminutillo wants to merge 1 commit intomasterfrom
fix-negative-throughput-when-queue-deleted
Open

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

Conversation

@mikeminutillo
Copy link
Copy Markdown
Member

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 totalMessages 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.

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.

1 participant