open-telemetry / opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
https://opentelemetry.io/
Apache License 2.0
1.07k stars 505 forks source link

otelzap: Add Benchmarks #5784

Closed khushijain21 closed 3 days ago

khushijain21 commented 1 week ago

Part of #5191

Pre-work #5279

goos: linux
goarch: amd64
pkg: go.opentelemetry.io/contrib/bridges/otelzap
cpu: 12th Gen Intel(R) Core(TM) i5-1245U
BenchmarkCoreWrite/10_fields-12              1000000          1116 ns/op         978 B/op         13 allocs/op
BenchmarkCoreWrite/20_fields-12               407290          2615 ns/op        2180 B/op         22 allocs/op
BenchmarkCoreWrite/Namespace-12               725268          1671 ns/op        1760 B/op         16 allocs/op
BenchmarkCoreWrite/With10_fields-12          4964038           260.2 ns/op       208 B/op          1 allocs/op
BenchmarkCoreWrite/With20_fields-12          2004085           628.7 ns/op       640 B/op          1 allocs/op
BenchmarkCoreWrite/WithNamespace-12         100000000           16.95 ns/op        0 B/op          0 allocs/op
PASS
ok      go.opentelemetry.io/contrib/bridges/otelzap 8.619s
codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.5%. Comparing base (669ca60) to head (049fd2d).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5784/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5784?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5784 +/- ## ======================================= - Coverage 64.5% 64.5% -0.1% ======================================= Files 200 200 Lines 12558 12558 ======================================= - Hits 8103 8101 -2 - Misses 4219 4220 +1 - Partials 236 237 +1 ``` | [Files](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5784?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [bridges/otelzap/core.go](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5784?src=pr&el=tree&filepath=bridges%2Fotelzap%2Fcore.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YnJpZGdlcy9vdGVsemFwL2NvcmUuZ28=) | `90.0% <ø> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/5784/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)