MCPcopy
hub / github.com/tinylib/msgp / BenchmarkReadNil

Function BenchmarkReadNil

msgp/read_test.go:320–332  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

318}
319
320func BenchmarkReadNil(b *testing.B) {
321 data := AppendNil(nil)
322 rd := NewReader(NewEndlessReader(data, b))
323 b.ReportAllocs()
324 b.SetBytes(1)
325 b.ResetTimer()
326 for i := 0; i < b.N; i++ {
327 err := rd.ReadNil()
328 if err != nil {
329 b.Fatal(err)
330 }
331 }
332}
333
334func TestReadFloat64(t *testing.T) {
335 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

ReadNilMethod · 0.95
AppendNilFunction · 0.85
NewReaderFunction · 0.85
NewEndlessReaderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…