-
Notifications
You must be signed in to change notification settings - Fork 440
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
[SDK] Add AdaptingCircularBufferCounter for exponential histograms #2158
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2158 +/- ##
==========================================
+ Coverage 87.15% 87.48% +0.33%
==========================================
Files 166 168 +2
Lines 4777 4869 +92
==========================================
+ Hits 4163 4259 +96
+ Misses 614 610 -4
|
…aware about new code
|
||
size_t start_index_ = kNullIndex; | ||
size_t end_index_ = kNullIndex; | ||
size_t base_index_ = kNullIndex; |
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.
while these variable names are self-descriptive, can you still add a comment before each for what they represent. Thanks.
template <typename T> | ||
void operator()(std::vector<T> &backing) | ||
{ | ||
std::fill(backing.begin(), backing.end(), 0); |
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.
you may have to typecast to static_cast<T>(0)
to get rid of CI failure.
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.
Thanks for the contribution. Nicely done.
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
thanks for the PR :)
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.
About the CI failure:
- check CI build
CI / CMake msvc (maintainer mode) (pull_request)
- check the logs, look for
circular_buffer.cc
, look forerror C2220
- see suggested fix from Lalit
Thanks for the PR.
Thanks for the review.
|
Updates #1391
Changes
Add AdaptingCircularBufferCounter, which will be used for buckets in exponential histograms.
This PR is mostly a rewrite of corresponding opentelemetry-java implementation and tests.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes