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

Use atomic utilities instead of synchronization in stats #407

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

acogoluegnes
Copy link
Collaborator

All the counters are converted to AtomicLong instead of regular, non-volatile properties updated and read in synchronized blocks. This avoids a lot of locking.

The Stats class has also been refactored to use nano time instead of the current time, which is more appropriate and more accurate to measure intervals.

All the counters are converted to AtomicLong instead of
regular, non-volatile properties updated and read in synchronized
blocks. This avoids a lot of locking.

The Stats class has also been refactored to use nano time
instead of the current time, which is more appropriate and
more accurate to measure intervals.
@acogoluegnes acogoluegnes added this to the 2.19.0 milestone Oct 7, 2022
@acogoluegnes acogoluegnes merged commit 174aeaf into main Oct 7, 2022
@acogoluegnes acogoluegnes deleted the stats-refactoring branch October 7, 2022 10:22
pivotal-rabbitmq-ci pushed a commit that referenced this pull request Oct 7, 2022
Use atomic utilities instead of synchronization in stats
acogoluegnes added a commit that referenced this pull request Jan 2, 2023
github-actions bot pushed a commit that referenced this pull request Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant