-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
v3: Update benchmarks for Logger Middleware #3061
Conversation
WalkthroughThe recent changes to Changes
Sequence Diagram(s)sequenceDiagram
participant Tester
participant BenchmarkSetup
participant BenchmarkSetupParallel
participant FiberApp
participant LoggerMiddleware
Note right of Tester: Refactored Benchmark Setup
Tester->>BenchmarkSetup: Call with specific configurations
Note right of Tester: Standard Benchmarking
Tester->>LoggerMiddleware: Performance test using b.Run
LoggerMiddleware-->>Tester: Returns benchmark results
Note right of Tester: Parallel Benchmarking
Tester->>BenchmarkSetupParallel: Call with specific configurations
Tester->>LoggerMiddleware: Performance test using b.Run
LoggerMiddleware-->>Tester: Returns parallel benchmark results
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3061 +/- ##
==========================================
- Coverage 83.04% 82.94% -0.10%
==========================================
Files 115 115
Lines 8315 8315
==========================================
- Hits 6905 6897 -8
- Misses 1077 1082 +5
- Partials 333 336 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- middleware/logger/logger_test.go (3 hunks)
Additional comments not posted (4)
middleware/logger/logger_test.go (4)
24-39
: LGTM! Efficient benchmark setup.The
benchmarkSetup
function is efficiently setting up the benchmark environment without introducing unnecessary overhead.
41-58
: LGTM! Well-implemented parallel benchmark setup.The
benchmarkSetupParallel
function correctly sets up the benchmark environment for parallel execution, ensuring accurate measurements.
647-800
: LGTM! Improved benchmarking structure.The refactoring of the
Benchmark_Logger
function into multipleb.Run
calls enhances the structure and comprehensiveness of the benchmarking tests, allowing for better analysis of the results.
802-955
: LGTM! Valuable addition of parallel benchmarks.The
Benchmark_Logger_Parallel
function provides valuable insights into the performance of the logger middleware under concurrent load. The structure is clear, and the scenarios are well-defined.
Description
Note: The logger middleware adds a significant amount of overhead compared to not using it:
Related to #3048
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