Home / Function/ Benchmark_Communication_Flow_Parallel() — fiber Function Reference

Benchmark_Communication_Flow_Parallel() — fiber Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

app_test.go lines 2850–2876

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

	app.Get("/", func(c Ctx) error {
		return c.SendString("Hello, World!")
	})

	h := app.Handler()

	b.ReportAllocs()
	b.RunParallel(func(pb *testing.PB) {
		fctx := &fasthttp.RequestCtx{}
		fctx.Request.Header.SetMethod(MethodGet)
		fctx.Request.SetRequestURI("/")
		for pb.Next() {
			h(fctx)
		}
	})

	verifyCtx := &fasthttp.RequestCtx{}
	verifyCtx.Request.Header.SetMethod(MethodGet)
	verifyCtx.Request.SetRequestURI("/")
	h(verifyCtx)

	require.Equal(b, 200, verifyCtx.Response.Header.StatusCode())
	require.Equal(b, "Hello, World!", string(verifyCtx.Response.Body()))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free