MCPcopy Index your code
hub / github.com/tinylib/msgp / BenchmarkAppendBool

Function BenchmarkAppendBool

msgp/write_bytes_test.go:401–410  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

399}
400
401func BenchmarkAppendBool(b *testing.B) {
402 vs := []bool{true, false}
403 buf := make([]byte, 0, 1)
404 b.SetBytes(1)
405 b.ReportAllocs()
406 b.ResetTimer()
407 for i := 0; i < b.N; i++ {
408 AppendBool(buf[0:0], vs[i%2])
409 }
410}
411
412func BenchmarkAppendTime(b *testing.B) {
413 t := time.Now()

Callers

nothing calls this directly

Calls 1

AppendBoolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…