-
Notifications
You must be signed in to change notification settings - Fork 135
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
buffered_metrics: reduce a bit lock contention #289
buffered_metrics: reduce a bit lock contention #289
Conversation
062e18c introduced a performance regression by trying to fix the computation of the actual sampling rate. This commit takes some shortcuts to reduce lock contention while trying to keep the sampling rate correct.
if s.specifiedRate != 1.0 { | ||
rate = s.specifiedRate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't match comment on specifiedRate
. Should we be checking totalSamples
in the condition above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the comment, originally I planned to try to do something smarter, but I think it would require more thinking .. so reverting to the previous behavior is a better first step
Co-authored-by: Vickenty Fesunov <[email protected]>
Co-authored-by: Scott Opell <[email protected]>
Co-authored-by: Scott Opell <[email protected]>
062e18c introduced a performance regression by trying to fix the computation of the actual sampling rate.
This commit takes some shortcuts to reduce lock contention while trying to keep the sampling rate correct.