Skip to content
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

Memory mode: Adding support for synchronous instruments - explicit histogram #6153

Conversation

asafm
Copy link
Contributor

@asafm asafm commented Jan 15, 2024

Epic

This is one of many PRs that implement #5105. See the complete plan here.
Specifically, this PR adds the implementation of MemoryMode for the synchronous instrument: explicit histogram.

What was done here?

This PR, relative to Exponential Histogram PR, is rather trivial. It contains:

  • It changes DoubleExplicitBucketHistogramAggregator by adding a reusable MutableHistogramPointData and when REUSABLE_DATA is set, it simply re-uses that reusable point to store the aggregated result and returns it.
  • Added a mutable version of HistogramPointData
    • Extracted 2 validation functions from ImmutableHistogramPointData into a shared class, to be used also at the mutable version.
  • Added another test to the garbage collection benchmark test.
    • Worked nicely as it immediately failed and I quickly found out why (auto-boxing of Long in tight loop)

It is based on #6136; hence, once it is merged, I'll merge it from the main branch to show its true content.

I will convert it from draft to PR once the previous PR is merged.

asafm and others added 26 commits November 19, 2023 16:37
…moryMode.java

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
…lder.java

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (737dfef) 91.03% compared to head (ca98743) 90.94%.

Files Patch % Lines
...trics/internal/data/MutableHistogramPointData.java 80.89% 2 Missing and 15 partials ⚠️
...gator/DoubleExplicitBucketHistogramAggregator.java 81.81% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6153      +/-   ##
============================================
- Coverage     91.03%   90.94%   -0.10%     
- Complexity     5648     5670      +22     
============================================
  Files           618      620       +2     
  Lines         16438    16535      +97     
  Branches       1663     1682      +19     
============================================
+ Hits          14965    15037      +72     
- Misses         1011     1020       +9     
- Partials        462      478      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Added ProfileBenchmark.
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of minor comments but looks good. Also, can you rebase and mark ready for review?

@asafm asafm marked this pull request as ready for review January 25, 2024 17:37
@asafm asafm requested a review from a team January 25, 2024 17:37
@asafm
Copy link
Contributor Author

asafm commented Jan 25, 2024

@jack-berg I fixed all comments and rebased it from the main branch.

@jack-berg jack-berg merged commit 8d1cad2 into open-telemetry:main Jan 25, 2024
18 checks passed
@asafm asafm deleted the memory-mode-sync-instruments-explicit-histogram branch January 28, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants