fix: reduce tokio runtime polling overhead - #530
Merged
Conversation
…kio-polling-overhead
…ing-overhead # Conflicts: # dt-common/src/meta/dt_queue.rs # dt-pipeline/src/base_pipeline.rs
gnolong
marked this pull request as ready for review
July 14, 2026 05:10
caiq1nyu
approved these changes
Jul 15, 2026
caiq1nyu
reviewed
Jul 15, 2026
Collaborator
There was a problem hiding this comment.
比较优雅点的应该是#[cfg(feature = "tracing")]直接控制这个类,引用的地方通过not feature来控制要不要with_trace或者dump。现在所有方法都在runtime_trace里实现了一遍not feature和feature的比较臃肿
caiq1nyu
reviewed
Jul 15, 2026
| self.remove_empty_check_logs().await?; | ||
| self.upload_check_logs_to_s3().await?; | ||
| log_finished!("task finished"); | ||
| if let Some(summary) = dt_common::runtime_trace::dump_global_summary() { |
Collaborator
There was a problem hiding this comment.
trace功能在finish才log就不适合cdc了,更好的是把trace指标和task_monitor结合起来,可以周期性输出,如果开启了metrics feature还可以通过prometheus style http api fetch
caiq1nyu
added a commit
that referenced
this pull request
Jul 15, 2026
* fix: reduce tokio runtime polling overhead (#530) * fix: reduce tokio runtime polling overhead * fmt * fix: remove unused tokio-util deps * fix: remove unused queue empty wait * fix: add tokio wake source summary * fix: rename tracing feature * fix: add runtime tracing task summary * fix: collect tokio task runtime metrics * fix * chore: code format (#539) --------- Co-authored-by: wanglong <46259301+gnolong@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tokio-consolefeature totracing, initialize tracing fromTaskRunner::start_task, and write plain or JSON summaries to a dedicated runtime trace log..awaitfuture and task future.plainmode is like: