Skip to content

Conversation

@dashpole
Copy link
Contributor

@dashpole dashpole commented Oct 8, 2025

Depends on #7474

This applies similar optimizations as #7427 to the last value aggregation.

Changes for last value are contained in 27e1482.

Parallel benchmarks:

                                                                   │   main.txt   │               lv.txt               │
                                                                   │    sec/op    │   sec/op     vs base               │
SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10-24     264.60n ± 3%   66.46n ± 1%  -74.88% (p=0.002 n=6)
SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10-24   270.25n ± 4%   69.69n ± 1%  -74.21% (p=0.002 n=6)
geomean                                                               267.4n        68.05n       -74.55%

@dashpole dashpole force-pushed the optimize_lastvalue branch from f6c58df to 27e1482 Compare October 8, 2025 19:23
@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 97.89474% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.8%. Comparing base (0c97dfd) to head (27e1482).

Files with missing lines Patch % Lines
sdk/metric/internal/aggregate/atomic.go 84.6% 4 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##            main   #7478    +/-   ##
======================================
  Coverage   85.7%   85.8%            
======================================
  Files        287     287            
  Lines      25347   25449   +102     
======================================
+ Hits       21744   21842    +98     
- Misses      3222    3224     +2     
- Partials     381     383     +2     
Files with missing lines Coverage Δ
sdk/metric/internal/aggregate/aggregate.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/histogram.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/lastvalue.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/sum.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/atomic.go 89.3% <84.6%> (-2.6%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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