MCPcopy
hub / github.com/bnb-chain/bsc / BenchmarkEncodeByteArrayStruct

Function BenchmarkEncodeByteArrayStruct

rlp/encode_test.go:599–610  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

597}
598
599func BenchmarkEncodeByteArrayStruct(b *testing.B) {
600 var out bytes.Buffer
601 var value byteArrayStruct
602
603 b.ReportAllocs()
604 for i := 0; i < b.N; i++ {
605 out.Reset()
606 if err := Encode(&out, &value); err != nil {
607 b.Fatal(err)
608 }
609 }
610}
611
612type structSliceElem struct {
613 X uint64

Callers

nothing calls this directly

Calls 3

FatalMethod · 0.80
EncodeFunction · 0.70
ResetMethod · 0.65

Tested by

no test coverage detected