Home / File/ logger_test.go — fiber Source File

logger_test.go — fiber Source File

Architecture documentation for logger_test.go, a go file in the fiber codebase. 1 imports, 0 dependents.

File go FiberCore Adapters 1 imports 33 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  97b45bc9_01a3_2a9a_4c94_9de1344ca94c["logger_test.go"]
  3c539dc4_ce70_7be5_43dc_5058a965884a["bufio"]
  97b45bc9_01a3_2a9a_4c94_9de1344ca94c --> 3c539dc4_ce70_7be5_43dc_5058a965884a
  style 97b45bc9_01a3_2a9a_4c94_9de1344ca94c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

//nolint:depguard // Because we test logging :D
package logger

import (
	"bufio"
	"bytes"
	"errors"
	"fmt"
	"io"
	"log"
	"net/http"
	"net/http/httptest"
	"os"
	"regexp"
	"runtime"
	"strconv"
	"sync"
	"testing"
	"time"

	"github.com/stretchr/testify/require"
	"github.com/valyala/bytebufferpool"
	"github.com/valyala/fasthttp"

	"github.com/gofiber/fiber/v3"
	fiberlog "github.com/gofiber/fiber/v3/log"
	"github.com/gofiber/fiber/v3/middleware/requestid"
)

const (
	pathFooBar = "/?foo=bar"
	httpProto  = "HTTP/1.1"
)

func benchmarkSetup(b *testing.B, app *fiber.App, uri string) {
	b.Helper()

	h := app.Handler()

	fctx := &fasthttp.RequestCtx{}
	fctx.Request.Header.SetMethod(fiber.MethodGet)
	fctx.Request.SetRequestURI(uri)

	b.ReportAllocs()

	for b.Loop() {
		h(fctx)
	}
}

func benchmarkSetupParallel(b *testing.B, app *fiber.App, path string) {
	b.Helper()

	handler := app.Handler()

	b.ReportAllocs()
	b.ResetTimer()

	b.RunParallel(func(pb *testing.PB) {
		fctx := &fasthttp.RequestCtx{}
// ... (1342 more lines)

Domain

Subdomains

Classes

Dependencies

  • bufio

Frequently Asked Questions

What does logger_test.go do?
logger_test.go is a source file in the fiber codebase, written in go. It belongs to the FiberCore domain, Adapters subdomain.
What functions are defined in logger_test.go?
logger_test.go defines 33 function(s): Benchmark_Logger, Benchmark_Logger_Parallel, Test_CustomTags, Test_Logger, Test_Logger_All, Test_Logger_AppendUint, Test_Logger_ByteSent_Streaming, Test_Logger_CLF_Format, Test_Logger_Combined_CLF_Format, Test_Logger_Data_Race, and 23 more.
What does logger_test.go depend on?
logger_test.go imports 1 module(s): bufio.
Where is logger_test.go in the architecture?
logger_test.go is located at middleware/logger/logger_test.go (domain: FiberCore, subdomain: Adapters, directory: middleware/logger).

Analyze Your Own Codebase

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

Try Supermodel Free