Home / Function/ Benchmark_Fiberlog_SetLevel() — fiber Function Reference

Benchmark_Fiberlog_SetLevel() — fiber Function Reference

Architecture documentation for the Benchmark_Fiberlog_SetLevel() function in fiberlog_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  1810371c_1a4f_423a_9192_641c6c687f7b["Benchmark_Fiberlog_SetLevel()"]
  28781060_572c_d6ba_cf27_6dc163d62c70["fiberlog_test.go"]
  1810371c_1a4f_423a_9192_641c6c687f7b -->|defined in| 28781060_572c_d6ba_cf27_6dc163d62c70
  style 1810371c_1a4f_423a_9192_641c6c687f7b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

log/fiberlog_test.go lines 92–137

func Benchmark_Fiberlog_SetLevel(b *testing.B) {
	mockLogger := &defaultLogger{}
	SetLogger(mockLogger)

	// Test cases
	testCases := []struct {
		name     string
		level    Level
		expected Level
	}{
		{
			name:     "Test case 1",
			level:    LevelDebug,
			expected: LevelDebug,
		},
		{
			name:     "Test case 2",
			level:    LevelInfo,
			expected: LevelInfo,
		},
		{
			name:     "Test case 3",
			level:    LevelWarn,
			expected: LevelWarn,
		},
		{
			name:     "Test case 4",
			level:    LevelError,
			expected: LevelError,
		},
		{
			name:     "Test case 5",
			level:    LevelFatal,
			expected: LevelFatal,
		},
	}

	for _, tc := range testCases {
		b.ReportAllocs()
		b.Run(tc.name, func(b *testing.B) {
			for b.Loop() {
				SetLevel(tc.level)
			}
		})
	}
}

Domain

Subdomains

Frequently Asked Questions

What does Benchmark_Fiberlog_SetLevel() do?
Benchmark_Fiberlog_SetLevel() is a function in the fiber codebase, defined in log/fiberlog_test.go.
Where is Benchmark_Fiberlog_SetLevel() defined?
Benchmark_Fiberlog_SetLevel() is defined in log/fiberlog_test.go at line 92.

Analyze Your Own Codebase

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

Try Supermodel Free