Benchmark_ShutdownServices() — fiber Function Reference
Architecture documentation for the Benchmark_ShutdownServices() function in services_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD b741d0b6_ba6a_4469_b423_43de82961be2["Benchmark_ShutdownServices()"] a3b050d2_f10a_df85_e082_e3ac664a6a6c["services_test.go"] b741d0b6_ba6a_4469_b423_43de82961be2 -->|defined in| a3b050d2_f10a_df85_e082_e3ac664a6a6c style b741d0b6_ba6a_4469_b423_43de82961be2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
services_test.go lines 550–591
func Benchmark_ShutdownServices(b *testing.B) {
benchmarkFn := func(b *testing.B, services []Service) {
b.Helper()
for b.Loop() {
app := New(Config{
Services: services,
})
ctx := context.Background()
if err := app.shutdownServices(ctx); err != nil {
b.Fatal("Expected no error but got", err)
}
}
}
b.Run("no-services", func(b *testing.B) {
benchmarkFn(b, []Service{})
})
b.Run("single-service", func(b *testing.B) {
benchmarkFn(b, []Service{
&mockService{name: "dep1"},
})
})
b.Run("multiple-services", func(b *testing.B) {
benchmarkFn(b, []Service{
&mockService{name: "dep1"},
&mockService{name: "dep2"},
&mockService{name: "dep3"},
})
})
b.Run("multiple-services-with-delays", func(b *testing.B) {
benchmarkFn(b, []Service{
&mockService{name: "dep1", terminateDelay: 1 * time.Millisecond},
&mockService{name: "dep2", terminateDelay: 2 * time.Millisecond},
&mockService{name: "dep3", terminateDelay: 3 * time.Millisecond},
})
})
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_ShutdownServices() do?
Benchmark_ShutdownServices() is a function in the fiber codebase, defined in services_test.go.
Where is Benchmark_ShutdownServices() defined?
Benchmark_ShutdownServices() is defined in services_test.go at line 550.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free