1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-10-08 23:21:56 +02:00
Files
opentelemetry-go/sdk
Robert Pająk 55ff06fbdd sdk/log: Change BenchmarkLoggerNewRecord to BenchmarkLoggerEmit (#6315)
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>
2025-02-14 09:40:02 +01:00
..
2025-02-04 17:13:41 +01:00
2025-02-04 17:13:41 +01:00
2024-03-26 20:13:54 +01:00

SDK

PkgGoDev