Home / Function/ Test_Pprof_Subs() — fiber Function Reference

Test_Pprof_Subs() — fiber Function Reference

Architecture documentation for the Test_Pprof_Subs() function in pprof_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  d0232f3d_3ae5_457d_383e_794030930c73["Test_Pprof_Subs()"]
  bab7fd6d_604c_3199_e6a9_4920ae309ff5["pprof_test.go"]
  d0232f3d_3ae5_457d_383e_794030930c73 -->|defined in| bab7fd6d_604c_3199_e6a9_4920ae309ff5
  style d0232f3d_3ae5_457d_383e_794030930c73 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/pprof/pprof_test.go lines 94–119

func Test_Pprof_Subs(t *testing.T) {
	app := fiber.New()

	app.Use(New())

	app.Get("/", func(c fiber.Ctx) error {
		return c.SendString("escaped")
	})

	subs := []string{
		"cmdline", "profile", "symbol", "trace", "allocs", "block",
		"goroutine", "heap", "mutex", "threadcreate",
	}

	for _, sub := range subs {
		t.Run(sub, func(t *testing.T) {
			target := "/debug/pprof/" + sub
			if sub == "profile" {
				target += "?seconds=1"
			}
			resp, err := app.Test(httptest.NewRequest(fiber.MethodGet, target, http.NoBody), testConfig)
			require.NoError(t, err)
			require.Equal(t, 200, resp.StatusCode)
		})
	}
}

Domain

Subdomains

Frequently Asked Questions

What does Test_Pprof_Subs() do?
Test_Pprof_Subs() is a function in the fiber codebase, defined in middleware/pprof/pprof_test.go.
Where is Test_Pprof_Subs() defined?
Test_Pprof_Subs() is defined in middleware/pprof/pprof_test.go at line 94.

Analyze Your Own Codebase

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

Try Supermodel Free