-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ middleware/pprof: improve performance (#2709)
* ⚡ 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 * 🌂 middleware/pprof: disable nonamedreturns linter on cutPrefix
- Loading branch information
1 parent
862ea7d
commit b99712f
Showing
1 changed file
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters