Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving counting of seen transactions in notification message #87

Merged
merged 1 commit into from
Aug 11, 2019

Conversation

cortinico
Copy link
Member

Fixing the count of transactions that is shown on the notification.
Apparently this code:

if (transaction.getStatus() == HttpTransaction.Status.Requested) {
            transactionCount++;
}

was causing a miscount of the seen HTTP calls. If a call is already .Completed by the time it gets reported to Chucker, the transactionCount variable won't be updated.
I'm replacing the simple counter with an HashSet of transaction IDs. This will allow us to precisely count how many HTTP Request/Response we saw and report it in the notification number.

Fixes #84

@cortinico cortinico added the bug Something isn't working label Aug 10, 2019
@cortinico cortinico added this to the 3.0.0 milestone Aug 10, 2019
@cortinico cortinico requested a review from redwarp August 10, 2019 12:17
@cortinico cortinico self-assigned this Aug 10, 2019
@cortinico cortinico merged commit 80dd6bc into develop Aug 11, 2019
@cortinico cortinico deleted the fix-84-count-to-zero branch August 11, 2019 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.0.0-beta1 always shows "0" in notification
2 participants