MCPcopy Create free account
hub / github.com/apache/fory / BenchmarkWriteVarUint64LoopMid

Function BenchmarkWriteVarUint64LoopMid

go/fory/buffer_bench_test.go:188–197  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

186}
187
188func BenchmarkWriteVarUint64LoopMid(b *testing.B) {
189 buf := NewByteBuffer(make([]byte, 0, 1024))
190 values := benchVarUint64MidValues
191 b.ReportAllocs()
192 b.ResetTimer()
193 for i := 0; i < b.N; i++ {
194 buf.writerIndex = 0
195 buf.WriteVarUint64(values[i%len(values)])
196 }
197}
198
199func BenchmarkWriteVarUint64LoopLarge(b *testing.B) {
200 buf := NewByteBuffer(make([]byte, 0, 1024))

Callers

nothing calls this directly

Calls 2

WriteVarUint64Method · 0.95
NewByteBufferFunction · 0.85

Tested by

no test coverage detected