MCPcopy Create free account
hub / github.com/DNAProject/DNA / BenchmarkWriteVarBytes

Function BenchmarkWriteVarBytes

common/serialization/serialize_test.go:42–48  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

40}
41
42func BenchmarkWriteVarBytes(b *testing.B) {
43 s := []byte{10, 11, 12}
44 buf := new(bytes.Buffer)
45 for i := 0; i < b.N; i++ {
46 WriteVarBytes(buf, s)
47 }
48}
49
50func BenchmarkWriteVarString(b *testing.B) {
51 s := "jim"

Callers

nothing calls this directly

Calls 1

WriteVarBytesFunction · 0.85

Tested by

no test coverage detected