Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ middleware/pprof: improve performance #2709

Merged
merged 2 commits into from
Nov 9, 2023

Commits on Nov 6, 2023

  1. ⚡ middleware/pprof: improve performance

    Concatenate the custom and fixed prefixes beforehand, so the trimmed path can be switched on against constant strings.
    
    goos: linux
    goarch: amd64
    pkg: github.com/gofiber/fiber/v2/middleware/pprof
    cpu: 13th Gen Intel(R) Core(TM) i9-13900K
    BenchmarkPprof/Slow-32         	 4912642	       246.3 ns/op	     480 B/op	      10 allocs/op
    BenchmarkPprof/Fast-32         	411908472	         2.913 ns/op	       0 B/op	       0 allocs/op
    PASS
    database64128 committed Nov 6, 2023
    Configuration menu
    Copy the full SHA
    456a337 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Configuration menu
    Copy the full SHA
    7d644bf View commit details
    Browse the repository at this point in the history