Skip to content
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

statistics: unify the length of Loads in hot statistics to 3 #5501

Merged
merged 10 commits into from
Sep 16, 2022

Conversation

HunDunDM
Copy link
Member

What problem does this PR solve?

Issue Number: Close #5500

What is changed and how does it work?

Check List

Tests

  • Unit test

Code changes

Side effects

Related changes

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 14, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • nolouch

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 14, 2022
@HunDunDM HunDunDM requested a review from lhy1024 September 14, 2022 06:27
@ti-chi-bot ti-chi-bot requested a review from JmPotato September 14, 2022 06:27
@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Base: 75.56% // Head: 75.65% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (b8f5afb) compared to base (5ac8256).
Patch coverage: 89.74% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5501      +/-   ##
==========================================
+ Coverage   75.56%   75.65%   +0.09%     
==========================================
  Files         321      321              
  Lines       31866    31855      -11     
==========================================
+ Hits        24078    24101      +23     
+ Misses       5712     5679      -33     
+ Partials     2076     2075       -1     
Flag Coverage Δ
unittests 75.65% <89.74%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/statistics/hot_cache.go 90.27% <ø> (ø)
server/statistics/hot_cache_task.go 86.36% <ø> (ø)
server/cluster/coordinator.go 71.11% <62.50%> (-0.83%) ⬇️
server/statistics/kind.go 40.00% <83.33%> (+5.62%) ⬆️
server/cluster/cluster.go 83.54% <100.00%> (+0.44%) ⬆️
server/schedulers/hot_region.go 85.51% <100.00%> (-0.28%) ⬇️
server/statistics/buckets/bucket_stat_informer.go 94.28% <100.00%> (+0.08%) ⬆️
server/statistics/hot_peer.go 97.05% <100.00%> (+0.04%) ⬆️
server/statistics/hot_peer_cache.go 96.87% <100.00%> (-0.04%) ⬇️
server/statistics/store_hot_peers_infos.go 100.00% <100.00%> (ø)
... and 30 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

server/cluster/cluster.go Outdated Show resolved Hide resolved
statistics.RegionWriteBytes: 1 * units.KiB,
statistics.RegionWriteKeys: 32,
statistics.RegionWriteQuery: 32,
var minHotThresholds [statistics.RegionStatCount]uint64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be the same? cc @bufferflies

server/statistics/hot_peer_cache.go Show resolved Hide resolved
statistics.RegionWriteQuery: 32,
var minHotThresholds [statistics.RegionStatCount]uint64

func init() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make a copy in the init function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Their values are the same.

server/statistics/kind.go Outdated Show resolved Hide resolved
server/schedulers/hot_region.go Outdated Show resolved Hide resolved
server/schedulers/hot_region.go Outdated Show resolved Hide resolved
server/schedulers/hot_region.go Outdated Show resolved Hide resolved
server/statistics/store_hot_peers_infos.go Show resolved Hide resolved
server/statistics/hot_peer_cache.go Outdated Show resolved Hide resolved
server/statistics/hot_peer_cache_test.go Show resolved Hide resolved
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Signed-off-by: HunDunDM <[email protected]>
Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 16, 2022
@lhy1024
Copy link
Contributor

lhy1024 commented Sep 16, 2022

/merge

@ti-chi-bot
Copy link
Member

@lhy1024: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

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.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 08f4b69

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 16, 2022
@ti-chi-bot
Copy link
Member

@HunDunDM: 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.

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.

@ti-chi-bot ti-chi-bot merged commit cbb5be0 into tikv:master Sep 16, 2022
@HunDunDM HunDunDM deleted the fix-load branch September 16, 2022 09:32
ti-chi-bot pushed a commit that referenced this pull request Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify the length of Loads in hot statistics to 3
5 participants