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

Add jitter option #2

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Add jitter option #2

merged 3 commits into from
Nov 14, 2024

Conversation

jeffreymeng
Copy link
Contributor

Adds an opt-in jitter option, which selects a time uniformly randomly from the interval [0.5, 1.0)*delay each time it pauses. The randomness is applied only to the sleep, and doesn't affect how much future delays increase by.

@jeffreymeng jeffreymeng requested a review from ekzhang November 14, 2024 18:14
@jeffreymeng jeffreymeng merged commit 11fa1f7 into main Nov 14, 2024
2 checks passed
@jeffreymeng jeffreymeng deleted the jeffreymeng/add-jitter branch November 14, 2024 18:40
@jeffreymeng
Copy link
Contributor Author

@ekzhang do you mind publishing the new version?

@ekzhang
Copy link
Member

ekzhang commented Nov 14, 2024

Will do!

@ekzhang
Copy link
Member

ekzhang commented Nov 14, 2024

Should be published now. https://crates.io/crates/named-retry

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.

2 participants