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

Function BenchmarkWriteVarInt

read_test.go:177–183  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

175}
176
177func BenchmarkWriteVarInt(b *testing.B) {
178 wb := &writeBuffer{w: ioutil.Discard}
179
180 for i := 0; i < b.N; i++ {
181 wb.writeVarInt(math.MaxInt64)
182 }
183}
184
185func BenchmarkReadVarInt(b *testing.B) {
186 b1 := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 1

writeVarIntMethod · 0.95

Tested by

no test coverage detected