Home / Function/ Benchmark_Encrypt_Cookie_Except() — fiber Function Reference

Benchmark_Encrypt_Cookie_Except() — fiber Function Reference

Architecture documentation for the Benchmark_Encrypt_Cookie_Except() function in encryptcookie_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  2bad5b34_2e5a_bab1_a4c2_28836b851ddd["Benchmark_Encrypt_Cookie_Except()"]
  ac3bbef3_a1d3_d68b_64fb_619088dde10d["encryptcookie_test.go"]
  2bad5b34_2e5a_bab1_a4c2_28836b851ddd -->|defined in| ac3bbef3_a1d3_d68b_64fb_619088dde10d
  style 2bad5b34_2e5a_bab1_a4c2_28836b851ddd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/encryptcookie/encryptcookie_test.go lines 498–531

func Benchmark_Encrypt_Cookie_Except(b *testing.B) {
	testKey := GenerateKey(32)
	app := fiber.New()

	app.Use(New(Config{
		Key: testKey,
		Except: []string{
			"test1",
		},
	}))

	app.Get("/", func(c fiber.Ctx) error {
		c.Cookie(&fiber.Cookie{
			Name:  "test1",
			Value: "SomeThing",
		})
		c.Cookie(&fiber.Cookie{
			Name:  "test2",
			Value: "SomeThing",
		})

		return nil
	})

	h := app.Handler()

	b.Run("Encrypt Cookie Except", func(b *testing.B) {
		for b.Loop() {
			ctx := &fasthttp.RequestCtx{}
			ctx.Request.Header.SetMethod(fiber.MethodGet)
			h(ctx)
		}
	})
}

Domain

Subdomains

Frequently Asked Questions

What does Benchmark_Encrypt_Cookie_Except() do?
Benchmark_Encrypt_Cookie_Except() is a function in the fiber codebase, defined in middleware/encryptcookie/encryptcookie_test.go.
Where is Benchmark_Encrypt_Cookie_Except() defined?
Benchmark_Encrypt_Cookie_Except() is defined in middleware/encryptcookie/encryptcookie_test.go at line 498.

Analyze Your Own Codebase

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

Try Supermodel Free