Refine some interface & bug fixes for page stress testing#3062
Refine some interface & bug fixes for page stress testing#3062ti-chi-bot merged 14 commits intopingcap:masterfrom
Conversation
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@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. |
| /*Just for no warming*/ | ||
| /*Just for no warning*/ | ||
| } | ||
| tracker.setDescription(description().c_str()); |
There was a problem hiding this comment.
This is a use after free bug
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
jiaqizho
left a comment
There was a problem hiding this comment.
Anyway, I'm not sure if we already have a code style manual or are already developing it. So in many places, I subconsciously define it in the style of C.
Summarized the following points:
- Check the
explicitin class construction - Check
constin function which in class - Do not use
(int)to forced transfer type - Check the
semicolonafter the class member - Case-check-in name
And I am also kindly seeking your code style suggestion. Thanks a lot.
| /*Just for no warning*/ | ||
| } | ||
| tracker.setDescription(description().c_str()); | ||
| auto peak = current_memory_tracker->getPeak(); |
There was a problem hiding this comment.
I am changing this logic, mainly because subsequent changes need to support more metrics dump.
for now, PSMetricsDumper only supports CurrentMetrics::MemoryTracking, and i will add CurrentMetrics::PSMVCCSnapshotsList to check snapshots number. So we still need use PSMetricsDumper to get peak.
| auto workload = creator(options); | ||
| LOG_INFO(StressEnv::logger, fmt::format("Start Running {} , {}", name, workload->desc())); | ||
| workload->run(); | ||
| if (!workload->verify()) |
There was a problem hiding this comment.
I was wondering whether it is C++ style that callback function should start with on, it looks more like Java style. If the callbacks all use on as a prefix, then I think that including verify and run also need to be prefixed with on?
There was a problem hiding this comment.
IMO, a function that does something is better to be named as an action.
I expected the function "failed" to be a function that returns a status that the worker is failed or not until I look at the implementation.
And I expected the function "result" to be a function that returns a string or something that represents a "result". But actually, it dumps the result inside the function.
|
Actually, the following 4 points are checked by the clang-tidy:
We introduce clang-tidy into CI by #2834, but now it is temporarily disabled since there are too many warnings
Seems that clang-tidy can not check it either 😂 |
great to know that 😂. |
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
|
LGTM |
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
|
@jiaqizho: 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. |
|
/merge |
|
@JaySon-Huang: 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: dc3c71b |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What is changed and how it works?
Proposal: xxx
What's Changed:
Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note