1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-19 21:45:50 +02:00
Files
Robert Pająk 51b03667ac attribute: add MAP type support (#8445)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7935

```
$ go test -run=^$ -bench=BenchmarkMap
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkMap/Len3/Value-20      12423774               143.1 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/KeyValue-20            8123966               170.4 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/AsMap-20              12685639               111.0 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/String-20              4482690               250.1 ns/op           128 B/op          1 allocs/op
BenchmarkMap/Len3/Emit-20                5927258               205.5 ns/op           128 B/op          1 allocs/op
BenchmarkMap/Len5Nested/Value-20         2773639               387.1 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/KeyValue-20      3093283               404.7 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/AsMap-20         8646662               161.1 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/String-20        2785362               499.1 ns/op           208 B/op          1 allocs/op
BenchmarkMap/Len5Nested/Emit-20          2882395               375.2 ns/op           208 B/op          1 allocs/op
```

```
$ go test -run=^$ -bench=BenchmarkHashValueMap
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkHashValueMap/Len2-20            7589696               133.0 ns/op            80 B/op          1 allocs/op
BenchmarkHashValueMap/Len5-20            6254871               205.7 ns/op            80 B/op          1 allocs/op
BenchmarkHashValueMap/Len8Nested-20      2726431               424.1 ns/op            80 B/op          1 allocs/op
```
2026-06-12 10:07:11 +02:00
..
2026-05-27 18:42:37 +02:00
2026-01-30 18:15:17 +01:00
2026-05-27 18:42:37 +02:00
2025-11-19 11:06:20 +01:00
2024-03-26 20:13:54 +01:00