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

Function benchmarkConnSeek

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

Source from the content-addressed store, hash-verified

1230}
1231
1232func benchmarkConnSeek(b *testing.B, conn *Conn, _ []byte) {
1233 for i := 0; i != b.N; i++ {
1234 if _, err := conn.Seek(int64(i%benchmarkMessageCount), SeekAbsolute); err != nil {
1235 b.Error(err)
1236 return
1237 }
1238 }
1239}
1240
1241func benchmarkConnRead(b *testing.B, conn *Conn, a []byte) {
1242 n := 0

Callers

nothing calls this directly

Calls 2

SeekMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected