Home / Function/ Benchmark_Bind_URI() — fiber Function Reference

Benchmark_Bind_URI() — fiber Function Reference

Architecture documentation for the Benchmark_Bind_URI() function in bind_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  e587007f_0e94_1abc_5f4b_7b47d51251b1["Benchmark_Bind_URI()"]
  55065b01_f5dc_4e53_5a74_5ecc7aca8f52["bind_test.go"]
  e587007f_0e94_1abc_5f4b_7b47d51251b1 -->|defined in| 55065b01_f5dc_4e53_5a74_5ecc7aca8f52
  style e587007f_0e94_1abc_5f4b_7b47d51251b1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

bind_test.go lines 1437–1470

func Benchmark_Bind_URI(b *testing.B) {
	var err error

	app := New()
	c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed

	c.route = &Route{
		Params: []string{
			"param1", "param2", "param3", "param4",
		},
	}
	c.values = [maxParams]string{
		"john", "doe", "is", "awesome",
	}

	var res struct {
		Param1 string `uri:"param1"`
		Param2 string `uri:"param2"`
		Param3 string `uri:"param3"`
		Param4 string `uri:"param4"`
	}

	b.ReportAllocs()

	for b.Loop() {
		err = c.Bind().URI(&res)
	}

	require.NoError(b, err)
	require.Equal(b, "john", res.Param1)
	require.Equal(b, "doe", res.Param2)
	require.Equal(b, "is", res.Param3)
	require.Equal(b, "awesome", res.Param4)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Benchmark_Bind_URI() do?
Benchmark_Bind_URI() is a function in the fiber codebase, defined in bind_test.go.
Where is Benchmark_Bind_URI() defined?
Benchmark_Bind_URI() is defined in bind_test.go at line 1437.

Analyze Your Own Codebase

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

Try Supermodel Free