-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
🧹 chore: Add Immutable benchmarks for default case #3374
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
Conversation
WalkthroughThis pull request adds two benchmark functions in Changes
Sequence Diagram(s)sequenceDiagram
participant B as Benchmark
participant A as App (Immutable)
participant R as Route Handler
participant C as RequestCtx
B->>A: Create app with Immutable config
A->>R: Register GET "/" route
loop For each iteration
B->>C: Initialize RequestCtx for GET "/"
C->>R: Execute route handler
R-->>C: Return response (nil)
end
sequenceDiagram
participant BP as Benchmark Parallel Runner
participant A as App (Immutable)
participant R as Route Handler
participant C as RequestCtx (Per Goroutine)
BP->>A: Create app with Immutable config
A->>R: Register GET "/" route
Note over BP,C: RunParallel spawns multiple goroutines
loop Concurrent iterations
BP->>C: Initialize RequestCtx for GET "/"
C->>R: Execute route handler
R-->>C: Return response (nil)
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Definitions (1)router_test.go (4)
⏰ Context from checks skipped due to timeout of 90000ms (7)
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3374 +/- ##
==========================================
+ Coverage 83.67% 83.73% +0.06%
==========================================
Files 118 118
Lines 11721 11721
==========================================
+ Hits 9807 9815 +8
+ Misses 1486 1480 -6
+ Partials 428 426 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Failing tests are related to timestamp not matching in Logger middleware. For some reason GitHub doesn't let me replay them |
Add benchmarks for default case with Immutable
Description
Add two benchmarks to cover the most basic use-case with
Immutable
flag enabledHow to run:
go test -v ./... -run=^$ -bench=Benchmark_Router_Next_Default -benchmem -count=4
Related #3367
Changes introduced
List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.
Type of change