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

Function BenchmarkWriteVarUint64LoopLarge

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

Source from the content-addressed store, hash-verified

197}
198
199func BenchmarkWriteVarUint64LoopLarge(b *testing.B) {
200 buf := NewByteBuffer(make([]byte, 0, 1024))
201 values := benchVarUint64LargeValues
202 b.ReportAllocs()
203 b.ResetTimer()
204 for i := 0; i < b.N; i++ {
205 buf.writerIndex = 0
206 buf.WriteVarUint64(values[i%len(values)])
207 }
208}
209
210func BenchmarkWriteVarUint32LoopSmall(b *testing.B) {
211 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