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

Function benchmarkConnReadOffsets

conn_test.go:1295–1303  ·  view source on GitHub ↗
(b *testing.B, conn *Conn, _ []byte)

Source from the content-addressed store, hash-verified

1293}
1294
1295func benchmarkConnReadOffsets(b *testing.B, conn *Conn, _ []byte) {
1296 for i := 0; i != b.N; i++ {
1297 _, _, err := conn.ReadOffsets()
1298 if err != nil {
1299 b.Error(err)
1300 return
1301 }
1302 }
1303}
1304
1305func benchmarkConnWrite(b *testing.B, conn *Conn, _ []byte) {
1306 a := make([]byte, 10e3) // 10 KB

Callers

nothing calls this directly

Calls 2

ReadOffsetsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected