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

Function BenchmarkWriteFloat32

msgp/write_test.go:288–297  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

286}
287
288func BenchmarkWriteFloat32(b *testing.B) {
289 f := rand.Float32()
290 wr := NewWriter(Nowhere)
291 b.SetBytes(5)
292 b.ReportAllocs()
293 b.ResetTimer()
294 for i := 0; i < b.N; i++ {
295 wr.WriteFloat32(f)
296 }
297}
298
299func TestWriteInt64(t *testing.T) {
300 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 2

WriteFloat32Method · 0.95
NewWriterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…