-
Notifications
You must be signed in to change notification settings - Fork 308
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
feat: refine scan metrics logging #4296
Conversation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
WalkthroughThe primary change involves the removal of the Changes
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 (
|
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 (4)
- src/mito2/src/read/scan_region.rs (2 hunks)
- src/mito2/src/read/seq_scan.rs (6 hunks)
- src/mito2/src/read/unordered_scan.rs (3 hunks)
- src/mito2/src/sst/parquet/reader.rs (4 hunks)
Files skipped from review due to trivial changes (1)
- src/mito2/src/read/scan_region.rs
Additional comments not posted (13)
src/mito2/src/read/unordered_scan.rs (3)
144-145
: Replaceprepare_scan_cost
withquery_start.elapsed()
.The
prepare_scan_cost
field has been replaced withself.stream_ctx.query_start.elapsed()
. Ensure that this change accurately reflects the intended metric.
149-150
: Introducefirst_poll
variable to track elapsed time before the first poll.The
first_poll
variable is introduced to log the elapsed time before the first poll. This is a useful metric for performance monitoring.
201-202
: Logfirst_poll
duration.The logging statement now includes the
first_poll
duration. This provides additional insights into the performance of the scan.src/mito2/src/read/seq_scan.rs (7)
93-94
: Replaceprepare_scan_cost
withquery_start.elapsed()
.The
prepare_scan_cost
field has been replaced withself.stream_ctx.query_start.elapsed()
. Ensure that this change accurately reflects the intended metric.
250-251
: Replaceprepare_scan_cost
withquery_start.elapsed()
.The
prepare_scan_cost
field has been replaced withself.stream_ctx.query_start.elapsed()
. Ensure that this change accurately reflects the intended metric.
257-258
: Introducefirst_poll
variable to track elapsed time before the first poll.The
first_poll
variable is introduced to log the elapsed time before the first poll. This is a useful metric for performance monitoring.
292-296
: Logfirst_poll
duration.The logging statement now includes the
first_poll
duration. This provides additional insights into the performance of the scan.
327-328
: Replaceprepare_scan_cost
withquery_start.elapsed()
.The
prepare_scan_cost
field has been replaced withself.stream_ctx.query_start.elapsed()
. Ensure that this change accurately reflects the intended metric.
335-336
: Introducefirst_poll
variable to track elapsed time before the first poll.The
first_poll
variable is introduced to log the elapsed time before the first poll. This is a useful metric for performance monitoring.
383-387
: Logfirst_poll
duration.The logging statement now includes the
first_poll
duration. This provides additional insights into the performance of the scan.src/mito2/src/sst/parquet/reader.rs (3)
873-876
: Trackscan_start
for elapsed time measurement.The
scan_start
variable is introduced to measure the elapsed time at the beginning of thenext_batch
method. This provides more accurate tracking of scan costs.
883-883
: Update scan cost after fetching the next record batch.The scan cost is updated after fetching the next record batch. Ensure that this change accurately reflects the intended metric.
896-896
: Update scan cost after processing batches.The scan cost is updated after processing the batches. Ensure that this change accurately reflects the intended metric.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4296 +/- ##
==========================================
- Coverage 85.31% 85.01% -0.30%
==========================================
Files 1063 1066 +3
Lines 188345 188633 +288
==========================================
- Hits 160686 160367 -319
- Misses 27659 28266 +607 |
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.
LGTM
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This PR fixes the scan cost metrics and changes the prepare cost metric. It also logs the elapsed time before the first poll.
Checklist
Summary by CodeRabbit
first_poll
duration).