-
Notifications
You must be signed in to change notification settings - Fork 650
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
Metrics: add possibility to release handles and observer instruments #435
Conversation
267b92c
to
6d483c1
Compare
Codecov Report
@@ Coverage Diff @@
## master #435 +/- ##
==========================================
+ Coverage 89.33% 89.48% +0.14%
==========================================
Files 43 43
Lines 2176 2215 +39
Branches 248 250 +2
==========================================
+ Hits 1944 1982 +38
Misses 161 161
- Partials 71 72 +1
Continue to review full report at Codecov.
|
f5ba16e
to
100174b
Compare
This commit implements a solution for releasing instrument handles and observers. For the handles it is based on a ref count that is increased each time the handled is acquired, when the ref count reaches 0 the handle is removed on collection time. The direct call convention is updated to release the handle after it has been updated. The observer instrument is only updated on collection time, so it can be removed as soon as the user request to do so.
100174b
to
4f2120f
Compare
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.
LGTM
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.
LGTM. I think this is likely to change with the removal of labelsets or the addition of metrics views, but no reason to hold this PR up now.
Fixes #399.
This commit implements a solution for releasing instrument handles and observers.
For the handles it is based on a ref count that is increased each time the
handled is acquired, when the ref count reaches 0 the handle is removed on
collection time. The direct call convention is updated to release the handle
after it has been updated.
The observer instrument is only updated on collection time, so it can be removed
as soon as the user request to do so.