You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add adaptable circular buffer implementation for ExponentialCounter. (#4087)
* Add adaptable circular buffer implementation for ExponentialCounter and expose hooks to test its use in Exponential Histogram aggregator.
* Clean up some adapting circular buffer code.
* Fix style issues.
* Apply spotless.
* Add tests for adapting integer array.
* Finish wiring ability to remember previous integer cell size and expand testing.
* Update array copy from code review.
* Fixes/cleanups from review.
- Fix a bug in equality where it was forcing ExponentialCounter to have
the same offset, even if it had stored 0 counts in all buckets. This
interacts negatively with merge/diff tests where creating a fresh
exponential bucket would have different indexStart then diff-ing
another.
- Modify default exponential bucket counter to be adapting circular
buffer.
- Remove some not-well-though-out methods (like zeroOf, zeroFrom) in
favor of a "clear" method on ExponentialCounter
- Modify ExponentialBucketStrategy to be an actual implementation.
* Improve testing of copy behavior across exponential-counter implementations.
* Last fix/cleanup for PR. Remove remaining TODO around preserving runtime optimisations.
* Fixes from review.
* Add test to ensure 0 is returned from exponential counters outside popualted range.
* Add a bunch of extra equality tests.
* run spotless.
* Add note about equality.
* Add copy() method to AdaptingIntegerArray, update tests.
* Fix checkstyle.
* Add internal disclaimer, reduce visibility of test classes
Co-authored-by: jack-berg <[email protected]>
Copy file name to clipboardExpand all lines: sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/aggregator/DoubleExponentialHistogramAggregator.java
Copy file name to clipboardExpand all lines: sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/internal/aggregator/DoubleExponentialHistogramBuckets.java
0 commit comments