MCPcopy
hub / github.com/segmentio/kafka-go / BenchmarkMarshal

Function BenchmarkMarshal

kafka_test.go:138–149  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

136}
137
138func BenchmarkMarshal(b *testing.B) {
139 for _, v := range benchmarkValues {
140 b.Run(fmt.Sprintf("%T", v), func(b *testing.B) {
141 for i := 0; i < b.N; i++ {
142 _, err := Marshal(v)
143 if err != nil {
144 b.Fatal(err)
145 }
146 }
147 })
148 }
149}
150
151func BenchmarkUnmarshal(b *testing.B) {
152 for _, v := range benchmarkValues {

Callers

nothing calls this directly

Calls 1

MarshalFunction · 0.70

Tested by

no test coverage detected