MCPcopy
hub / github.com/labstack/echo / BenchmarkContext_GetSet

Function BenchmarkContext_GetSet

perf_bench_test.go:95–104  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

93}
94
95func BenchmarkContext_GetSet(b *testing.B) {
96 e := New()
97 c := e.NewContext(httptest.NewRequest(http.MethodGet, "/", nil), &nopResponseWriter{})
98 b.ReportAllocs()
99 b.ResetTimer()
100 for i := 0; i < b.N; i++ {
101 c.Set("key", i)
102 _ = c.Get("key")
103 }
104}
105
106type bindTarget struct {
107 ID int `json:"id" query:"id"`

Callers

nothing calls this directly

Calls 4

SetMethod · 0.95
GetMethod · 0.95
NewFunction · 0.85
NewContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…