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

Function BenchmarkDecoderedirectionMsgs

redirect_msgp_test.go:221–236  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

219}
220
221func BenchmarkDecoderedirectionMsgs(b *testing.B) {
222 v := redirectionMsgs{}
223 var buf bytes.Buffer
224 msgp.Encode(&buf, &v)
225 b.SetBytes(int64(buf.Len()))
226 rd := msgp.NewEndlessReader(buf.Bytes(), b)
227 dc := msgp.NewReader(rd)
228 b.ReportAllocs()
229 b.ResetTimer()
230 for i := 0; i < b.N; i++ {
231 err := v.DecodeMsg(dc)
232 if err != nil {
233 b.Fatal(err)
234 }
235 }
236}

Callers

nothing calls this directly

Calls 4

LenMethod · 0.95
BytesMethod · 0.95
DecodeMsgMethod · 0.95
FatalMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…