You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-10-08 23:21:56 +02:00
I find having benchmark for `Emit` more useful than just for `newRecord`. It can be used to showcase the performance benefit of using `Enabled` even for a record with 10 attributes. ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/log cpu: 13th Gen Intel(R) Core(TM) i7-13800H BenchmarkLoggerEmit/5_attributes-20 511827 2609 ns/op 41947 B/op 1 allocs/op BenchmarkLoggerEmit/10_attributes-20 1000000 3520 ns/op 46905 B/op 5 allocs/op BenchmarkLoggerEnabled-20 263691399 4.549 ns/op 0 B/op 0 allocs/op ``` --------- Co-authored-by: Damien Mathieu <42@dmathieu.com>