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

Reuse memory in metric pipelines #3760

Merged
merged 11 commits into from
Mar 9, 2023

Conversation

MadVikingGod
Copy link
Contributor

This change starts the process of reusing memory from slices.

This does reduce the number of allocations in the histogram benchmark to 4x the number of collects

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #3760 (f9e2be3) into main (7dc7b30) will decrease coverage by 0.1%.
The diff coverage is 86.5%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3760     +/-   ##
=======================================
- Coverage   81.6%   81.6%   -0.1%     
=======================================
  Files        168     169      +1     
  Lines      12477   12489     +12     
=======================================
+ Hits       10193   10201      +8     
- Misses      2069    2073      +4     
  Partials     215     215             
Impacted Files Coverage Δ
sdk/metric/pipeline.go 89.5% <76.0%> (-1.2%) ⬇️
sdk/metric/periodic_reader.go 91.8% <94.7%> (+0.1%) ⬆️
sdk/metric/internal/reuse_slice.go 100.0% <100.0%> (ø)
sdk/metric/manual_reader.go 85.0% <100.0%> (-0.2%) ⬇️
sdk/metric/reader.go 100.0% <100.0%> (ø)

@MrAlias MrAlias added pkg:SDK Related to an SDK package area:metrics Part of OpenTelemetry Metrics labels Feb 23, 2023
sdk/metric/internal/reuse_slice.go Show resolved Hide resolved
sdk/metric/periodic_reader.go Outdated Show resolved Hide resolved
sdk/metric/internal/reuse_slice.go Show resolved Hide resolved
sdk/metric/pipeline.go Outdated Show resolved Hide resolved
MadVikingGod and others added 2 commits February 24, 2023 07:44
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 24, 2023
sdk/metric/pipeline.go Outdated Show resolved Hide resolved
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@MrAlias MrAlias changed the title Reuse memory in in pipelines. Reuse memory in metric pipelines Mar 3, 2023
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
Development

Successfully merging this pull request may close these issues.

4 participants