resrc_mtr: reorganize code structure for flexibility#10998
resrc_mtr: reorganize code structure for flexibility#10998ti-chi-bot merged 34 commits intotikv:masterfrom
Conversation
…n of new modules Signed-off-by: mornyx <mornyx.z@gmail.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
4c5ca18 to
daa3499
Compare
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
|
This PR was separated from tikv#10973 and only changes the code structure without adding the summary module. PTAL, Thanks! /cc @zhongzc @crazycs520 @breeswish |
|
@mornyx: GitHub didn't allow me to request PR reviews from the following users: crazycs520. Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| // TODO(mornyx): Review this case. | ||
| // (According to my personal observation, this should not be empty.) | ||
| // | ||
| // assert!(test_suite.fetch_reported_cpu_time().is_empty()); |
There was a problem hiding this comment.
The logic here comes from the fact that if the reporter's address was not set, the corresponding collector would be unregistered and the recorder would hang due to no collector. The recorder would restart on L35, but the result would be empty because the workload was cancelled in time on L31.
Nowadays collectors are not only the ones corresponding to the reporter but also the ones registered by the pd statistics collector, so the recorder keeps running. I think we can add a line between L35 and L36
test_suite.flush_agent();to fix it.
There was a problem hiding this comment.
👍
The reason for this problem is that I changed the Collector in Recorder to static binding.
There was a problem hiding this comment.
I tried this method on the latest code, but the integration test still failed (pipeline here).
I think if we do clean up first and then wait, we will still receive the data, so I put test_suite.flush_receiver() between L36 and L37, and it passed the test. PLTA: test_dynamic_config.rs#L37.
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
| futures = "0.3" | ||
| pdqselect = "0.1" | ||
| fail = "0.4" | ||
| thread-id = "4.0.0" |
There was a problem hiding this comment.
According to utils.rs#L31,we also provide a way to get the thread id on non-linux systems. It is only used to distinguish different threads, not for actual CPU sampling work.
|
@crazycs520: Thanks for your review. The bot only counts approvals from reviewers and higher roles in list, but you're still welcome to leave your comments. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Signed-off-by: mornyx <mornyx.z@gmail.com>
Signed-off-by: mornyx <mornyx.z@gmail.com>
|
LGTM |
Co-authored-by: Zhenchi <zhongzc_arch@outlook.com> Signed-off-by: mornyx <mornyx.z@gmail.com>
d1fce5f to
324df63
Compare
|
/merge |
|
@zhongzc: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 0d54eb4 |
|
@mornyx: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
/test |
What problem does this PR solve?
Reorganize resource-metering code structure to facilitate the addition of new modules.
What's Changed:
Recorderinto aSubRecordertrait for the collection of various resources.Related changes
Check List
Tests
Release note