MCPcopy
hub / github.com/gofiber/fiber / BenchmarkAppendMsgitem

Function BenchmarkAppendMsgitem

middleware/cache/manager_msgp_test.go:157–167  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

155}
156
157func BenchmarkAppendMsgitem(b *testing.B) {
158 v := item{}
159 bts := make([]byte, 0, v.Msgsize())
160 bts, _ = v.MarshalMsg(bts[0:0])
161 b.SetBytes(int64(len(bts)))
162 b.ReportAllocs()
163 b.ResetTimer()
164 for i := 0; i < b.N; i++ {
165 bts, _ = v.MarshalMsg(bts[0:0])
166 }
167}
168
169func BenchmarkUnmarshalitem(b *testing.B) {
170 v := item{}

Callers

nothing calls this directly

Calls 2

MsgsizeMethod · 0.95
MarshalMsgMethod · 0.95

Tested by

no test coverage detected