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: replace loads with []float64 in peer info #3729

Merged
merged 9 commits into from
Jun 2, 2021

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jun 1, 2021

What problem does this PR solve?

replace loads with []float64 in peer info

What is changed and how it works?

Check List

Tests

  • Unit test

Release note

None

Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@lhy1024 lhy1024 requested review from Yisaer and rleungx June 1, 2021 16:41
@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 1, 2021
@lhy1024 lhy1024 added component/scheduler Scheduler logic. component/statistics Statistics for scheduling. type/refactor The issue belongs to a refactor work. labels Jun 1, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 2, 2021
server/statistics/util.go Outdated Show resolved Hide resolved
server/statistics/util.go Outdated Show resolved Hide resolved
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
server/cluster/cluster.go Outdated Show resolved Hide resolved
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Yisaer
  • rleungx

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 2, 2021
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

// GetLoads returns loads from region
func (r *RegionInfo) GetLoads() []float64 {
return []float64{
float64(r.GetBytesRead()),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this unity to GetLoadbyKind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will move kind.go of statistic to core in a later pr to avoid circular dependencies

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 2, 2021

/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: 2a0d92f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 2, 2021
@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 2, 2021

/rebuild

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jun 2, 2021

/run-all-tests

@codecov
Copy link

codecov bot commented Jun 2, 2021

Codecov Report

Merging #3729 (dbcbfa8) into master (7792ece) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3729      +/-   ##
==========================================
+ Coverage   74.98%   75.00%   +0.01%     
==========================================
  Files         244      244              
  Lines       24426    24404      -22     
==========================================
- Hits        18316    18303      -13     
+ Misses       4491     4484       -7     
+ Partials     1619     1617       -2     
Flag Coverage Δ
unittests 75.00% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
server/core/kind.go 61.90% <ø> (ø)
pkg/mock/mockcluster/mockcluster.go 95.70% <100.00%> (-0.16%) ⬇️
server/cluster/cluster.go 82.80% <100.00%> (+0.02%) ⬆️
server/core/peer.go 81.25% <100.00%> (-3.37%) ⬇️
server/core/region.go 89.70% <100.00%> (+0.24%) ⬆️
server/statistics/hot_peer_cache.go 95.84% <100.00%> (-0.17%) ⬇️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
pkg/etcdutil/etcdutil.go 84.70% <0.00%> (-3.53%) ⬇️
pkg/dashboard/adapter/manager.go 79.78% <0.00%> (-3.20%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-1.67%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7792ece...dbcbfa8. Read the comment docs.

@ti-chi-bot ti-chi-bot merged commit 037d673 into tikv:master Jun 2, 2021
bufferflies pushed a commit to bufferflies/pd that referenced this pull request Jul 9, 2021
* statistics: replace loads with []float64 in peer info

Signed-off-by: lhy1024 <admin@liudos.us>

* remove unused code

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* remove unused code

Signed-off-by: lhy1024 <admin@liudos.us>

* fix test

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* misc

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
bufferflies pushed a commit to bufferflies/pd that referenced this pull request Jul 9, 2021
* statistics: replace loads with []float64 in peer info

Signed-off-by: lhy1024 <admin@liudos.us>

* remove unused code

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* remove unused code

Signed-off-by: lhy1024 <admin@liudos.us>

* fix test

Signed-off-by: lhy1024 <admin@liudos.us>

* address comment

Signed-off-by: lhy1024 <admin@liudos.us>

* misc

Signed-off-by: lhy1024 <admin@liudos.us>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/scheduler Scheduler logic. component/statistics Statistics for scheduling. 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. type/refactor The issue belongs to a refactor work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants