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

Function acquireDefaultCtxForAppBenchmark

app_test.go:3367–3376  ·  view source on GitHub ↗
(b *testing.B, app *App, fctx *fasthttp.RequestCtx)

Source from the content-addressed store, hash-verified

3365}
3366
3367func acquireDefaultCtxForAppBenchmark(b *testing.B, app *App, fctx *fasthttp.RequestCtx) *DefaultCtx {
3368 b.Helper()
3369
3370 ctx := app.AcquireCtx(fctx)
3371 defaultCtx, ok := ctx.(*DefaultCtx)
3372 if !ok {
3373 b.Fatal("AcquireCtx did not return *DefaultCtx")
3374 }
3375 return defaultCtx
3376}
3377
3378func Benchmark_Ctx_AcquireReleaseFlow_Parallel(b *testing.B) {
3379 app := New()

Calls 2

AcquireCtxMethod · 0.80
FatalMethod · 0.65

Tested by

no test coverage detected