We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 565eba4 commit 5cddc9aCopy full SHA for 5cddc9a
sdk/log/record_test.go
@@ -1023,3 +1023,23 @@ func BenchmarkSetAddAttributes(b *testing.B) {
1023
}
1024
})
1025
1026
+
1027
+func BenchmarkSetBody(b *testing.B) {
1028
+ b.Run("SetBody", func(b *testing.B) {
1029
+ records := make([]Record, b.N)
1030
1031
+ b.ResetTimer()
1032
+ b.ReportAllocs()
1033
+ for i := 0; i < b.N; i++ {
1034
+ records[i].SetBody(log.MapValue(
1035
+ log.Bool("0", true),
1036
+ log.Float64("2", 3.0),
1037
+ log.String("3", "forth"),
1038
+ log.Slice("4", log.Int64Value(1)),
1039
+ log.Map("5", log.Int("key", 2)),
1040
+ log.Bytes("6", []byte("six")),
1041
+ log.Int64("1", 3),
1042
+ ))
1043
+ }
1044
+ })
1045
+}
0 commit comments