Home / Function/ Benchmark_Ctx_AcquireReleaseFlow() — fiber Function Reference

Benchmark_Ctx_AcquireReleaseFlow() — fiber Function Reference

Architecture documentation for the Benchmark_Ctx_AcquireReleaseFlow() function in app_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  e658c74d_d765_a971_0504_5d322a9925a9["Benchmark_Ctx_AcquireReleaseFlow()"]
  e728fdd2_242f_706b_c1d2_041b3d6badb5["app_test.go"]
  e658c74d_d765_a971_0504_5d322a9925a9 -->|defined in| e728fdd2_242f_706b_c1d2_041b3d6badb5
  style e658c74d_d765_a971_0504_5d322a9925a9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

app_test.go lines 2879–2901

func Benchmark_Ctx_AcquireReleaseFlow(b *testing.B) {
	app := New()

	fctx := &fasthttp.RequestCtx{}

	b.Run("withoutRequestCtx", func(b *testing.B) {
		b.ReportAllocs()

		for b.Loop() {
			c, _ := app.AcquireCtx(fctx).(*DefaultCtx) //nolint:errcheck // not needed
			app.ReleaseCtx(c)
		}
	})

	b.Run("withRequestCtx", func(b *testing.B) {
		b.ReportAllocs()

		for b.Loop() {
			c, _ := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck // not needed
			app.ReleaseCtx(c)
		}
	})
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Benchmark_Ctx_AcquireReleaseFlow() do?
Benchmark_Ctx_AcquireReleaseFlow() is a function in the fiber codebase, defined in app_test.go.
Where is Benchmark_Ctx_AcquireReleaseFlow() defined?
Benchmark_Ctx_AcquireReleaseFlow() is defined in app_test.go at line 2879.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free