Home / Function/ Benchmark_Logger_Parallel() — fiber Function Reference

Benchmark_Logger_Parallel() — fiber Function Reference

Architecture documentation for the Benchmark_Logger_Parallel() function in logger_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  3ccedabb_676f_9cc3_9b02_fc7538b8f355["Benchmark_Logger_Parallel()"]
  97b45bc9_01a3_2a9a_4c94_9de1344ca94c["logger_test.go"]
  3ccedabb_676f_9cc3_9b02_fc7538b8f355 -->|defined in| 97b45bc9_01a3_2a9a_4c94_9de1344ca94c
  06bf4e86_2b82_9ae1_e999_cde345b1e49b["benchmarkSetupParallel()"]
  3ccedabb_676f_9cc3_9b02_fc7538b8f355 -->|calls| 06bf4e86_2b82_9ae1_e999_cde345b1e49b
  style 3ccedabb_676f_9cc3_9b02_fc7538b8f355 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/logger/logger_test.go lines 1224–1401

func Benchmark_Logger_Parallel(b *testing.B) {
	b.Run("NoMiddleware", func(bb *testing.B) {
		app := fiber.New()
		app.Get("/", func(c fiber.Ctx) error {
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("WithBytesAndStatus", func(bb *testing.B) {
		app := fiber.New()
		app.Use(New(Config{
			Format: "${bytesReceived} ${bytesSent} ${status}",
			Stream: io.Discard,
		}))
		app.Get("/", func(c fiber.Ctx) error {
			c.Set("test", "test")
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("DefaultFormat", func(bb *testing.B) {
		app := fiber.New()
		app.Use(New(Config{
			Stream: io.Discard,
		}))
		app.Get("/", func(c fiber.Ctx) error {
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("DefaultFormatWithFiberLog", func(bb *testing.B) {
		app := fiber.New()
		logger := fiberlog.DefaultLogger[*log.Logger]()
		logger.SetOutput(io.Discard)
		app.Use(New(Config{
			Stream: LoggerToWriter(logger, fiberlog.LevelDebug),
		}))
		app.Get("/", func(c fiber.Ctx) error {
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("DefaultFormatDisableColors", func(bb *testing.B) {
		app := fiber.New()
		app.Use(New(Config{
			Stream:        io.Discard,
			DisableColors: true,
		}))
		app.Get("/", func(c fiber.Ctx) error {
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("DefaultFormatForceColors", func(bb *testing.B) {
		app := fiber.New()
		app.Use(New(Config{
			Stream:      io.Discard,
			ForceColors: true,
		}))
		app.Get("/", func(c fiber.Ctx) error {
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")
	})

	b.Run("WithTagParameter", func(bb *testing.B) {
		app := fiber.New()
		app.Use(New(Config{
			Format: "${bytesReceived} ${bytesSent} ${status} ${reqHeader:test}",
			Stream: io.Discard,
		}))
		app.Get("/", func(c fiber.Ctx) error {
			c.Set("test", "test")
			return c.SendString("Hello, World!")
		})
		benchmarkSetupParallel(bb, app, "/")

Domain

Subdomains

Frequently Asked Questions

What does Benchmark_Logger_Parallel() do?
Benchmark_Logger_Parallel() is a function in the fiber codebase, defined in middleware/logger/logger_test.go.
Where is Benchmark_Logger_Parallel() defined?
Benchmark_Logger_Parallel() is defined in middleware/logger/logger_test.go at line 1224.
What does Benchmark_Logger_Parallel() call?
Benchmark_Logger_Parallel() calls 1 function(s): benchmarkSetupParallel.

Analyze Your Own Codebase

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

Try Supermodel Free