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

Function BenchmarkReadComplex128

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

Source from the content-addressed store, hash-verified

899}
900
901func BenchmarkReadComplex128(b *testing.B) {
902 f := complex(rand.Float64(), rand.Float64())
903 data := AppendComplex128(nil, f)
904 rd := NewReader(NewEndlessReader(data, b))
905 b.SetBytes(int64(len(data)))
906 b.ReportAllocs()
907 b.ResetTimer()
908 for i := 0; i < b.N; i++ {
909 _, err := rd.ReadComplex128()
910 if err != nil {
911 b.Fatal(err)
912 }
913 }
914}
915
916func TestTime(t *testing.T) {
917 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

ReadComplex128Method · 0.95
AppendComplex128Function · 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…