-
Notifications
You must be signed in to change notification settings - Fork 34
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
Avoid contention on Instant::now()
calls
#82
Conversation
Saturate in `duration_since` and `sub` instead of using global atomic variable to guarantee monotonicity of clocks. See metrics-rs#81 for more details. Closes metrics-rs#81
During development:
|
This test is sort of inherently flaky, so I wouldn't worry about it. I'll likely end up marking it as
Hmm, yeah, interesting. 🤔 |
Thanks! Waiting for the new release to move back to upstream instead of a fork. |
FWIW, I tracked down and fixed the issue with the |
@loyd This PR is now released as of Thanks again for your contribution. 👍🏻 |
Instant::duration_since
now saturates to zero.contention
benchmark and store results inbenches/README.md
.Instant::elapsed
is added to makeInstant
drop-in replacement ofstd::time::Instant
.CHANGELOG.md
(according to keepachangelog spec).Results (performed on an AMD Ryzen 7 4800HS CPU):
Closes #81