RW
a5c07b7c78
Apply suggestions from code review
2025-03-31 09:30:03 +02:00
Juan Calderon-Perez
a9c29b121c
Update default example and test
2025-03-30 21:31:41 -04:00
Juan Calderon-Perez
9ea8b223a7
Fix tests file
2025-03-30 17:49:41 -04:00
Juan Calderon-Perez
27f9563e2d
Fix docs, add missing benchmarks
2025-03-30 17:43:11 -04:00
Juan Calderon-Perez
4c48576768
Fix unit-tests. Update documentation
2025-03-30 17:39:32 -04:00
Juan Calderon-Perez
4ff6a2ecc0
Fix lint issues
2025-03-30 17:13:40 -04:00
Juan Calderon-Perez
72992999ed
Add missing helpers for golang built-in types
2025-03-30 17:07:19 -04:00
Juan Calderon-Perez
99d8db951a
Merge branch 'main' into state-management
2025-03-30 13:53:02 -04:00
Juan Calderon-Perez
75281bd874
🧹 chore: Simplify HealthCheck middleware ( #3380 )
...
* Simplify middleware
* Rename default endpoints
2025-03-30 11:46:52 +02:00
Kashiwa
e90fe8afbc
♻️ Refactor: remove redundant field `method` in `DefaultCtx` ( #3372 )
...
* ♻️ Refactor: remove redundant field method in defaultCtx
* ♻️ Refactor: rename getMethodINT to getMethodInt
2025-03-26 13:16:53 +01:00
Juan Calderon-Perez
dab20c9df5
🧹 chore: Add Immutable benchmarks for default case ( #3374 )
...
Add benchmarks for default case with Immutable
2025-03-26 13:09:43 +01:00
Juan Calderon-Perez
bf89799511
Merge branch 'main' into state-management
2025-03-25 07:02:55 -04:00
Kashiwa
4bf292945d
♻️ Refactor: reduce DefaultCtx from 736 to 728 bytes ( #3368 )
2025-03-25 08:30:41 +01:00
Mazyar Yousefiniyae shad
7606c618d3
📚 Doc: Add more validation examples ( #3369 )
...
* add examples on valudator guid
* ref: return prev validation comment
2025-03-25 08:25:56 +01:00
Kashiwa
ef40c04ede
♻️ Refactor: reduce DefaultCtx from 768 bytes to 736 bytes ( #3353 )
...
* ♻️ Refactor: reduce DefaultCtx from 768 bytes to 736 bytes
* ♻️ Refactor: add comments
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2025-03-23 16:58:43 +01:00
Edvard
e947e03ed2
🔥 feat(logger): Add predefined log formats ( #3359 )
...
* feat(logger): Add predefined log formats
This commit introduces predefined log formats for the logger middleware, enhancing its flexibility and ease of use. Users can now specify formats like "common", "combined", and "json" in addition to the default format.
Changes:
- Added a `format.go` file to store predefined log format constants.
- Updated `config.go` to include documentation for the `Format` configuration option, explaining the available placeholders and predefined formats.
- Modified `logger.go` to utilize the predefined formats based on the `Format` configuration.
- Added a new test case `Test_Logger_CLF` in `logger_test.go` to verify the "common" log format.
* feat(logger): Use predefined formats and fix default format
This commit updates the logger middleware to utilize the predefined log formats introduced in a previous commit. It also fixes the default format to use the `FormatDefault` constant.
Changes:
- Updated `config.go` to use `FormatDefault` constant for the default format.
- Updated `default_logger.go` to use `FormatDefault` constant for the default format.
- Added new test cases in `logger_test.go` to verify the "common", "combined" and "json" log formats.
- Updated `format.go` to add newline character to the end of the default format.
* feat(logger): Document and exemplify predefined formats
* fix(logger): Improve test assertions based on golangci-lint
* docs(logger): Improve documentation and formatting logger.md based on markdownlint-cli2
* docs(logger): Improve documentation based on markdownlint-cli2
* fix(logger): Improve combined and JSON format tests
* feat(logger): Add ECS log format
* feat(logger): Add CustomFormat option
This commit introduces a `CustomFormat` option to the `Config` struct, allowing users to specify a predefined format (like "common", "combined", "json", or "ecs")
* feat(logger): Add ECS log format to examples and config
* docs(logger): Update examples in whats_new.md
* feat(logger): Remove CustomFormat option and renamed Format consts
- Removed `CustomFormat` field from `Config`.
- Removed `LoggerConfig` map.
- Rename predefined formats constants.
* docs(logger): Update documentation and examples after format refactor
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2025-03-21 16:13:21 +01:00
Oleksandr Redko
f6ac929fde
🧹 chore: Mark unused tests with t.SkipNow ( #3366 )
...
* 🚨 test: uncomment test and mark it with t.SkipNow
* fix lint issues
2025-03-20 14:35:59 +01:00
Muhammed Efe Cetin
804e8f8b75
update
2025-03-19 15:32:42 +03:00
Muhammed Efe Cetin
1dbd1cc1d5
fix linter
2025-03-19 15:26:58 +03:00
Muhammed Efe Cetin
cbd2f09999
add has method
2025-03-19 15:20:41 +03:00
Muhammed Efe Cetin
8f5aeedc39
update what's new
2025-03-19 15:15:10 +03:00
Muhammed Efe Cetin
ff5f09d413
add docs
2025-03-19 15:13:52 +03:00
M. Efe Çetin
87f3f0c8b6
🐛 bug: fix client iterators when using break statement ( #3357 )
...
* 🐛 bug: fix client iterators when using break statement
* fix linter
2025-03-19 11:00:16 +01:00
Muhammed Efe Cetin
7f0afef988
add GetStateWithDefault helper
2025-03-19 12:30:44 +03:00
Juan Calderon-Perez
6fa12bbda8
Fix typo
2025-03-18 23:28:53 -04:00
Muhammed Efe Cetin
5af18cc275
fix linter
2025-03-18 22:03:26 +03:00
Muhammed Efe Cetin
8fb7753a14
increase test coverage
2025-03-18 21:46:04 +03:00
Muhammed Efe Cetin
655677e8bd
✨ feat: add support for application state management
2025-03-18 21:38:17 +03:00
Juan Calderon-Perez
395c8fafa9
🧹 chore: Fix linter workflow failures ( #3354 )
...
* Fix linter workflow failures
* Bump golang.org/x/net to v0.36.0
* Try skipping golangci-lint cache
* Update linter.yml
* fix: directives and spaces
* fix: better configuration
* fix: golangci-lint install
* Update golangci-lint version
* Enable SA4023
* Update golangci-lint config
* Remove duplicated rule
---------
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2025-03-17 08:29:51 +01:00
Juan Calderon-Perez
b56a141d59
docs: Update helmet.md default values ( #3350 )
...
Update helmet.md
2025-03-14 07:51:34 +01:00
Juan Calderon-Perez
ef4437cd65
Merge pull request #3348 from devhaozi/patch-1
...
docs: Update Helmet Middleware default values
2025-03-12 19:20:10 -04:00
耗子
eb7b00b4fb
fix: default value comment
2025-03-13 01:44:57 +08:00
JIeJaitt
c0599ee1d4
🔥 feat: Add Skip function to logger middleware ( #3333 )
...
* 🔥 Feature(logger): Add Filter option to logger middleware
* 📚 Doc(logger): Clarify Filter middleware description
* 🚨 Test(logger): Enhance logger filter test with parallel subtests
* 🔒 Test(logger): Add mutex to prevent race conditions in logger test
* 🔥 Feature(logger): Add Filter option to logger middleware
* 📚 Doc(logger): Clarify Filter middleware description
* 🚨 Test(logger): Enhance logger filter test with parallel subtests
* 🔒 Test(logger): Add mutex to prevent race conditions in logger test
* 🚨 Test(logger): Refactor logger test to improve test isolation
* Fix issue with unit-tests
* Update middleware/logger/logger_test.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Apply logger filter as soon as possible
* 📚 Doc: Add logger filter configuration example to whats_new.md
* 📚 Doc: Update logger filter documentation in whats_new.md
* 📚 Doc: Update logger filter documentation and examples
* 🩹 Fix: improve what_new.md
* Update logic for Filter() in Logger middleware. Add more unit-tests
* Rename fields to match expressjs/morgan
* Update middleware/logger/default_logger.go
---------
Co-authored-by: Juan Calderon-Perez <jgcalderonperez@protonmail.com>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: RW <rene@gofiber.io>
2025-03-10 09:06:11 +01:00
Kashiwa
1b26cf6b5e
♻️ Refactor: optimize routeParser by using sync.Pool ( #3343 )
...
* ♻️ Refactor: add routerParser pool
```
goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 9J14 96-Core Processor
│ ori.txt │ pool.txt │
│ sec/op │ sec/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-16 173.9n ± 0% 159.3n ± 1% -8.37% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-16 163.9n ± 0% 150.9n ± 0% -7.90% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-16 165.4n ± 1% 150.6n ± 1% -8.95% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-16 174.9n ± 0% 160.6n ± 0% -8.15% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-16 520.2n ± 0% 438.1n ± 1% -15.78% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-16 521.8n ± 0% 436.8n ± 0% -16.29% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-16 630.0n ± 0% 525.0n ± 0% -16.67% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-16 633.3n ± 0% 526.4n ± 0% -16.89% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-16 627.8n ± 0% 527.5n ± 0% -15.97% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-16 602.1n ± 0% 501.9n ± 0% -16.65% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-16 604.9n ± 0% 504.3n ± 0% -16.62% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-16 616.7n ± 0% 512.8n ± 1% -16.86% (p=0.000 n=20)
geomean 390.5n 336.5n -13.84%
│ ori.txt │ pool.txt │
│ B/op │ B/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-16 152.0 ± 0% 144.0 ± 0% -5.26% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-16 144.0 ± 0% 136.0 ± 0% -5.56% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-16 144.0 ± 0% 136.0 ± 0% -5.56% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-16 160.0 ± 0% 152.0 ± 0% -5.00% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-16 440.0 ± 0% 368.0 ± 0% -16.36% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-16 440.0 ± 0% 368.0 ± 0% -16.36% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-16 536.0 ± 0% 432.0 ± 0% -19.40% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-16 536.0 ± 0% 432.0 ± 0% -19.40% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-16 536.0 ± 0% 432.0 ± 0% -19.40% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-16 528.0 ± 0% 424.0 ± 0% -19.70% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-16 528.0 ± 0% 424.0 ± 0% -19.70% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-16 528.0 ± 0% 424.0 ± 0% -19.70% (p=0.000 n=20)
geomean 337.9 288.8 -14.52%
│ ori.txt │ pool.txt │
│ allocs/op │ allocs/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-16 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-16 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-16 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=20)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-16 5.000 ± 0% 4.000 ± 0% -20.00% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-16 13.000 ± 0% 9.000 ± 0% -30.77% (p=0.000 n=20)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-16 13.000 ± 0% 9.000 ± 0% -30.77% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-16 14.000 ± 0% 9.000 ± 0% -35.71% (p=0.000 n=20)
geomean 9.811 6.868 -29.99%
```
* 🩹 Fix: golangci-lint problem
2025-03-10 09:04:04 +01:00
Kashiwa
600ebd95ce
♻️ Refactor: replace isInCharset with bytes.IndexByte ( #3342 )
2025-03-07 15:33:22 +01:00
vinicius
4177ab4086
🔥 feat: Add support for context.Context in keyauth middleware ( #3287 )
...
* feat(middleware): add support to context.Context in keyauth middleware
pretty straightforward option to use context.Context instead of just
fiber.Ctx, tests added accordingly.
* fix(middleware): include import that was missing from previous commit
* fix(middleware): include missing import
* Replace logger with panic
* Update keyauth_test.go
* Update keyauth_test.go
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2025-03-07 08:23:24 +01:00
Juan Calderon-Perez
208b9e36ba
Merge pull request #3341 from gofiber/dependabot/go_modules/golang.org/x/crypto-0.36.0
...
build(deps): bump golang.org/x/crypto from 0.35.0 to 0.36.0
2025-03-06 07:43:17 -05:00
dependabot[bot]
6a9cd7d212
build(deps): bump golang.org/x/crypto from 0.35.0 to 0.36.0
...
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.35.0 to 0.36.0.
- [Commits](https://github.com/golang/crypto/compare/v0.35.0...v0.36.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 12:29:49 +00:00
Kashiwa
6953325df5
♻️ Refactor: replace findLastCharsetPosition with strings.LastIndexByte ( #3338 )
...
* ♻️ Refactor: replace findLastCharsetPosition with strings.LastIndexByte
* 🩹 Fix: correct loop condition in Go benchmark
2025-03-06 09:00:18 +01:00
RW
a5c7b77aec
Update release.yml
2025-03-05 15:08:00 +01:00
RW
a46937efe3
Update release-drafter.yml
2025-03-05 15:07:49 +01:00
nickajacks1
64c1771c26
🔥 Feature: Add Req and Res API ( #2894 )
...
* 🔥 feat: add Req and Res interfaces
Split the existing Ctx API into two separate APIs for Requests and
Responses. There are two goals to this change:
1. Reduce cognitive load by making it more obvious whether a Ctx method
interacts with the request or the response.
2. Increase API parity with Express.
* fix(req,res): several issues
* Sprinkle in calls to Req() and Res() to a few unit tests
* Fix improper initialization caught by ^
* Add a few missing methods
* docs: organize Ctx methods by request and response
* feat(req,res): sync more missed methods
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2025-03-05 08:01:43 +01:00
耗子
8e54c8f938
🐛 fix: Update binder in form_test ( #3336 )
...
* Fix: error binder in form_test
* fix: form tag
* Fix: error package name
2025-03-04 05:46:05 +01:00
Kashiwa
9e6f4fd408
♻️ Refactor: reduce the memory usage of RoutePatternMatch ( #3335 )
...
* ♻️ Refactor: improve RoutePatternMatch by adding RemoveEscapeCharBytes
```
goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 7763 64-Core Processor
│ route_pattern_match_old.txt │ route_pattern_match_new.txt │
│ sec/op │ sec/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 263.4n ± 2% 249.0n ± 4% -5.47% (p=0.001 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 258.7n ± 4% 244.7n ± 2% -5.43% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 254.6n ± 4% 246.3n ± 2% -3.26% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 265.1n ± 4% 255.6n ± 3% -3.60% (p=0.001 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 775.9n ± 3% 775.6n ± 2% ~ (p=0.424 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 796.7n ± 3% 767.1n ± 2% -3.72% (p=0.001 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 916.2n ± 1% 904.8n ± 3% ~ (p=0.052 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 913.8n ± 4% 909.1n ± 3% ~ (p=0.393 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 915.0n ± 3% 907.2n ± 2% ~ (p=0.165 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 917.5n ± 2% 876.7n ± 2% -4.46% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 918.5n ± 2% 886.8n ± 2% -3.45% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 935.6n ± 2% 901.9n ± 2% -3.60% (p=0.000 n=10)
geomean 588.3n 570.7n -2.99%
│ route_pattern_match_old.txt │ route_pattern_match_new.txt │
│ B/op │ B/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 168.0 ± 0% 152.0 ± 0% -9.52% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 160.0 ± 0% 144.0 ± 0% -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 160.0 ± 0% 144.0 ± 0% -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 176.0 ± 0% 160.0 ± 0% -9.09% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 440.0 ± 0% 440.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 464.0 ± 0% 440.0 ± 0% -5.17% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
geomean 353.7 337.9 -4.47%
¹ all samples are equal
│ route_pattern_match_old.txt │ route_pattern_match_new.txt │
│ allocs/op │ allocs/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 13.00 ± 0% 13.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 14.00 ± 0% 13.00 ± 0% -7.14% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
geomean 10.67 9.811 -8.08%
¹ all samples are equal
```
* ♻️ Refactor: returned type of analyseParameterPart and analyseConstantPart
```
goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 7763 64-Core Processor
│ route_pattern_match_old.txt │ route_pattern_match_new3.txt │
│ sec/op │ sec/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 264.3n ± 2% 253.8n ± 2% -3.95% (p=0.001 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 258.5n ± 1% 247.6n ± 2% -4.24% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 260.8n ± 3% 249.7n ± 4% -4.26% (p=0.003 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 265.4n ± 2% 256.1n ± 2% -3.49% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 783.8n ± 2% 777.5n ± 3% ~ (p=0.218 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 797.8n ± 1% 773.6n ± 3% -3.03% (p=0.001 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 920.3n ± 2% 926.0n ± 3% ~ (p=0.896 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 920.4n ± 4% 908.2n ± 2% ~ (p=0.063 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 927.9n ± 2% 919.0n ± 3% ~ (p=0.579 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 920.4n ± 3% 889.5n ± 3% -3.36% (p=0.007 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 916.9n ± 2% 891.9n ± 2% -2.73% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 938.8n ± 5% 891.2n ± 2% -5.07% (p=0.000 n=10)
geomean 591.7n 575.5n -2.73%
│ route_pattern_match_old.txt │ route_pattern_match_new3.txt │
│ B/op │ B/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 168.0 ± 0% 152.0 ± 0% -9.52% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 160.0 ± 0% 144.0 ± 0% -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 160.0 ± 0% 144.0 ± 0% -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 176.0 ± 0% 160.0 ± 0% -9.09% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 440.0 ± 0% 440.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 464.0 ± 0% 440.0 ± 0% -5.17% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 536.0 ± 0% 536.0 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 544.0 ± 0% 528.0 ± 0% -2.94% (p=0.000 n=10)
geomean 353.7 337.9 -4.47%
¹ all samples are equal
│ route_pattern_match_old.txt │ route_pattern_match_new3.txt │
│ allocs/op │ allocs/op vs base │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4 6.000 ± 0% 5.000 ± 0% -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4 13.00 ± 0% 13.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4 14.00 ± 0% 13.00 ± 0% -7.14% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4 14.00 ± 0% 14.00 ± 0% ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4 15.00 ± 0% 14.00 ± 0% -6.67% (p=0.000 n=10)
geomean 10.67 9.811 -8.08%
¹ all samples are equal
```
---------
Co-authored-by: RW <rene@gofiber.io>
2025-03-03 08:31:20 +01:00
Kashiwa
6afba957f1
🩹 Fix: sorting error in sortAcceptedTypes ( #3331 )
...
* 🩹 Fix: correct sorting error in sortAcceptedTypes.
* ♻️ Refactor: remove redundant branch
---------
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2025-03-01 18:14:50 +01:00
Juan Calderon-Perez
86cf80630b
Merge pull request #3334 from gofiber/dependabot/github_actions/codecov/codecov-action-5.4.0
...
build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0
2025-02-27 07:47:15 -05:00
dependabot[bot]
8e395fd4e3
build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v5.3.1...v5.4.0 )
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-02-27 12:36:56 +00:00
Giovanni Rivera
b568915b70
📚 docs: Add Retry Addon documentation ( #3330 )
...
* 📚 Doc: Add addon tab to /docs
* 📚 Doc: Add retry to addon docs
* 📚 Doc: Update retry README.md
* 🎨 Styles: Update addon/retry docs to respect markdownlint-cli2
* 📚 Doc: Update addon tab description to be singular
* 📚 Doc: Use retry prefix in retry docs
* 📚 Doc: Add retry addon to whats_new.md
* 🎨 Styles: Update whats_new.md to respect markdownlint-cli2
2025-02-27 08:46:41 +01:00
René
0bf0353a13
Merge remote-tracking branch 'origin/main'
2025-02-27 08:45:58 +01:00
René
47e9c8fa6d
only run benchmark when golang files are changed
2025-02-27 08:45:47 +01:00