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

Function BenchmarkDecoderedirectionMsg

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

Source from the content-addressed store, hash-verified

106}
107
108func BenchmarkDecoderedirectionMsg(b *testing.B) {
109 v := redirectionMsg{}
110 var buf bytes.Buffer
111 msgp.Encode(&buf, &v)
112 b.SetBytes(int64(buf.Len()))
113 rd := msgp.NewEndlessReader(buf.Bytes(), b)
114 dc := msgp.NewReader(rd)
115 b.ReportAllocs()
116 b.ResetTimer()
117 for i := 0; i < b.N; i++ {
118 err := v.DecodeMsg(dc)
119 if err != nil {
120 b.Fatal(err)
121 }
122 }
123}
124
125func TestMarshalUnmarshalredirectionMsgs(t *testing.T) {
126 v := redirectionMsgs{}

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…