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

Function BenchmarkReadComplex64

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

Source from the content-addressed store, hash-verified

857}
858
859func BenchmarkReadComplex64(b *testing.B) {
860 f := complex(rand.Float32(), rand.Float32())
861 data := AppendComplex64(nil, f)
862 rd := NewReader(NewEndlessReader(data, b))
863 b.SetBytes(int64(len(data)))
864 b.ReportAllocs()
865 b.ResetTimer()
866 for i := 0; i < b.N; i++ {
867 _, err := rd.ReadComplex64()
868 if err != nil {
869 b.Fatal(err)
870 }
871 }
872}
873
874func TestReadComplex128(t *testing.T) {
875 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

ReadComplex64Method · 0.95
AppendComplex64Function · 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…