Benchmark_Path_matchParams() — fiber Function Reference
Architecture documentation for the Benchmark_Path_matchParams() function in path_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 4576d011_6f4b_33cb_cd83_668e7618db61["Benchmark_Path_matchParams()"] 3c817cfc_3291_59ba_a2f8_291f66a9b0a1["path_test.go"] 4576d011_6f4b_33cb_cd83_668e7618db61 -->|defined in| 3c817cfc_3291_59ba_a2f8_291f66a9b0a1 style 4576d011_6f4b_33cb_cd83_668e7618db61 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
path_test.go lines 334–362
func Benchmark_Path_matchParams(t *testing.B) {
var ctxParams [maxParams]string
benchCaseFn := func(testCollection routeCaseCollection) {
parser := parseRoute(testCollection.pattern)
for _, c := range testCollection.testCases {
var matchRes bool
state := "match"
if !c.match {
state = "not match"
}
t.Run(testCollection.pattern+" | "+state+" | "+c.url, func(b *testing.B) {
for b.Loop() {
if match := parser.getMatch(c.url, c.url, &ctxParams, c.partialCheck); match {
// Get testCases from the original path
matchRes = true
}
}
require.Equal(t, c.match, matchRes, "route: '%s', url: '%s'", testCollection.pattern, c.url)
if matchRes && len(c.params) > 0 {
require.Equal(t, c.params[0:len(c.params)-1], ctxParams[0:len(c.params)-1], "route: '%s', url: '%s'", testCollection.pattern, c.url)
}
})
}
}
for _, testCollection := range benchmarkCases {
benchCaseFn(testCollection)
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_Path_matchParams() do?
Benchmark_Path_matchParams() is a function in the fiber codebase, defined in path_test.go.
Where is Benchmark_Path_matchParams() defined?
Benchmark_Path_matchParams() is defined in path_test.go at line 334.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free