Skip to content

Add benchmark for synchronous gauge measurement#7407

Merged
dashpole merged 2 commits intoopen-telemetry:mainfrom
dashpole:gauge_bench
Sep 25, 2025
Merged

Add benchmark for synchronous gauge measurement#7407
dashpole merged 2 commits intoopen-telemetry:mainfrom
dashpole:gauge_bench

Conversation

@dashpole
Copy link
Copy Markdown
Contributor

These were missing from our benchmarks for synchronous instruments.

Single-threaded:

goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/metric
cpu: Intel(R) Xeon(R) CPU @ 2.20GHz
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/0         	  114369	       106.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/1         	  106424	       119.4 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/10        	   79513	       128.7 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/0         	  110667	       166.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/1         	  103809	       150.2 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/10        	   76430	       144.2 ns/op	       0 B/op	       0 allocs/op

Parallel:

goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/metric
cpu: Intel(R) Xeon(R) CPU @ 2.20GHz
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/0-24         	   40507	       283.4 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/1-24         	   43918	       305.3 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Float64Gauge/Attributes/10-24        	   41348	       291.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/0-24         	   48070	       291.1 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/1-24         	   43290	       274.9 ns/op	       0 B/op	       0 allocs/op
BenchmarkSyncMeasure/NoView/Int64Gauge/Attributes/10-24        	   40003	       325.0 ns/op	       0 B/op	       0 allocs/op

@dashpole dashpole added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 24, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.5%. Comparing base (97e2244) to head (e71e40c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #7407   +/-   ##
=====================================
  Coverage   85.5%   85.5%           
=====================================
  Files        277     277           
  Lines      24644   24644           
=====================================
  Hits       21076   21076           
  Misses      3189    3189           
  Partials     379     379           

see 2 files with indirect coverage changes

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

@dashpole
Copy link
Copy Markdown
Contributor Author

dashpole commented Sep 25, 2025

Merging early since it is trivial

@dashpole dashpole merged commit 2e0b5b4 into open-telemetry:main Sep 25, 2025
31 checks passed
@dashpole dashpole deleted the gauge_bench branch September 25, 2025 13:30
@MrAlias MrAlias added this to the v1.39.0 milestone Oct 14, 2025
@MrAlias MrAlias mentioned this pull request Jan 16, 2026
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants