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

otellogr: Add benchmarks #6364

Merged

Conversation

scorpionknifes
Copy link
Member

@scorpionknifes scorpionknifes commented Nov 24, 2024

Add benchmarks (similar to otelslog)
Part of #5192

Benchmark results:

goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/bridges/otellogr
cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
BenchmarkLogSink/Info-16                 6114177               186.4 ns/op           160 B/op          1 allocs/op
BenchmarkLogSink/Error-16                6649935               245.2 ns/op           160 B/op          1 allocs/op
BenchmarkLogSink/WithValues-16           3949730               295.6 ns/op           448 B/op          3 allocs/op
BenchmarkLogSink/WithName-16             6813362               172.0 ns/op           133 B/op          2 allocs/op
BenchmarkLogSink/WithName.WithValues-16                  2420191               606.4 ns/op           581 B/op          5 allocs/op
BenchmarkLogSink/(WithName.WithValues).Info-16          12601381                97.32 ns/op            0 B/op          0 allocs/op
PASS
ok      go.opentelemetry.io/contrib/bridges/otellogr    24.125s

@scorpionknifes scorpionknifes requested review from pellared and a team as code owners November 24, 2024 08:53
@scorpionknifes scorpionknifes added Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG bridge: logr Related to the logr bridge labels Nov 24, 2024
@dmathieu
Copy link
Member

Could you add the result of those benchmarks to the PR description ?

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.9%. Comparing base (0da64d1) to head (719992b).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6364   +/-   ##
=====================================
  Coverage   66.9%   66.9%           
=====================================
  Files        193     193           
  Lines      15652   15652           
=====================================
+ Hits       10480   10483    +3     
+ Misses      4881    4879    -2     
+ Partials     291     290    -1     

see 1 file with indirect coverage changes

@pellared pellared merged commit 91a1588 into open-telemetry:main Nov 26, 2024
26 checks passed
@MrAlias MrAlias added this to the v1.33.0 milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge: logr Related to the logr bridge Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants