-
Notifications
You must be signed in to change notification settings - Fork 728
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
tools: support changing the percentage of heartbeat #7698
Conversation
Signed-off-by: Ryan Leung <rleungx@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. Reviewer can indicate their review by submitting an approval review. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7698 +/- ##
==========================================
- Coverage 73.80% 73.78% -0.03%
==========================================
Files 429 429
Lines 47439 47413 -26
==========================================
- Hits 35014 34983 -31
- Misses 9424 9451 +27
+ Partials 3001 2979 -22
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
REST LGTM
tools/pd-heartbeat-bench/main.go
Outdated
}) | ||
NoUpdatedRegionsNum := int(float64(cfg.RegionCount) * ratio) | ||
res := make([]int, 0, NoUpdatedRegionsNum) | ||
i := 0 |
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.
i := 0 | |
for i := 0; len(res) < NoUpdatedRegionsNum; i++ { | |
if _, ok := updatedMap[slice[i]]; !ok { | |
res = append(res, slice[i]) | |
} | |
} |
rand.Shuffle(cfg.RegionCount, func(i, j int) { | ||
slice[i], slice[j] = slice[j], slice[i] | ||
}) | ||
NoUpdatedRegionsNum := int(float64(cfg.RegionCount) * ratio) |
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.
And do we need check the NoUpdatedRegionsNum + len(updatedMap)
should less than len(slice)
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Signed-off-by: Ryan Leung <rleungx@gmail.com>
/merge |
@rleungx: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: c17150f
|
ref tikv#7703 Signed-off-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: pingandb <songge102@pingan.com.cn>
What problem does this PR solve?
Issue Number: Ref #7703.
What is changed and how does it work?
Check List
Tests
stage1: use default leader-update-ratio 0.06
stage2: increase leader-update-ratio to 0.12, the report number is doubled and update cache also doubled.
stage3: change no-update-ratio from 0 to 0.12, only the report number is doubled.
Release note