Home / Function/ Benchmark_Fiberlog_SetLevel_Parallel() — fiber Function Reference

Benchmark_Fiberlog_SetLevel_Parallel() — fiber Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

log/fiberlog_test.go lines 164–212

func Benchmark_Fiberlog_SetLevel_Parallel(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.Run(tc.name+"_Parallel", func(bb *testing.B) {
			bb.ReportAllocs()
			bb.ResetTimer()
			bb.RunParallel(func(pb *testing.PB) {
				for pb.Next() {
					SetLevel(tc.level)
				}
			})
		})
	}
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free