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

Function BenchmarkWriteVarString

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

Source from the content-addressed store, hash-verified

48}
49
50func BenchmarkWriteVarString(b *testing.B) {
51 s := "jim"
52 buf := new(bytes.Buffer)
53 for i := 0; i < b.N; i++ {
54 WriteString(buf, s)
55 }
56}
57
58func BenchmarkReadVarUint(b *testing.B) {
59 data := []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}

Callers

nothing calls this directly

Calls 1

WriteStringFunction · 0.85

Tested by

no test coverage detected