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

placement: add rule/group count metrics #7232

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

nolouch
Copy link
Contributor

@nolouch nolouch commented Oct 19, 2023

What problem does this PR solve?

Issue Number: Close #7242

What is changed and how does it work?

placement: add rule/group count metrics

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    image

Release note

None.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 19, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • 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 bot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 19, 2023
@ti-chi-bot ti-chi-bot bot requested review from disksing and lhy1024 October 19, 2023 08:20
@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 19, 2023
@nolouch nolouch requested review from rleungx and removed request for disksing October 19, 2023 08:20
pkg/schedule/placement/rule_manager_test.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Oct 19, 2023
pkg/schedule/placement/rule_manager_test.go Outdated Show resolved Hide resolved
@@ -127,6 +139,10 @@ func (c *Controller) isSchedulingHalted() bool {
// ResetSchedulerMetrics resets metrics of all schedulers.
func (c *Controller) ResetSchedulerMetrics() {
schedulerStatusGauge.Reset()
ruleStatusGauge.Reset()
// create in map again
rulesCntStatusGauge = ruleStatusGauge.WithLabelValues("rule_count")
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 use recreate?

Copy link
Contributor Author

@nolouch nolouch Oct 19, 2023

Choose a reason for hiding this comment

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

I wonder if the reset will clean the metricsMap.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ptal @rleungx

Signed-off-by: nolouch <[email protected]>
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #7232 (6aac92e) into master (8b2896b) will decrease coverage by 0.17%.
Report is 7 commits behind head on master.
The diff coverage is 32.58%.

❗ Current head 6aac92e differs from pull request most recent head 30431fc. Consider uploading reports for the commit 30431fc to get more accurate results

@@            Coverage Diff             @@
##           master    #7232      +/-   ##
==========================================
- Coverage   74.65%   74.48%   -0.17%     
==========================================
  Files         442      442              
  Lines       47744    47914     +170     
==========================================
+ Hits        35642    35688      +46     
- Misses       8957     9074     +117     
- Partials     3145     3152       +7     
Flag Coverage Δ
unittests 74.48% <32.58%> (-0.17%) ⬇️

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

@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Oct 20, 2023
@nolouch
Copy link
Contributor Author

nolouch commented Oct 20, 2023

/merge

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 20, 2023

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

/run-all-tests

You only need to trigger /merge once, and 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.

If you have any questions about the PR merge process, please refer to pr process.

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
Contributor

ti-chi-bot bot commented Oct 20, 2023

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

Commit hash: 6aac92e

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Oct 20, 2023
@ti-chi-bot ti-chi-bot bot merged commit 952fbf7 into tikv:master Oct 20, 2023
19 checks passed
@nolouch nolouch deleted the add-rule-metrics branch October 23, 2023 06:04
@nolouch nolouch added the needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. label Oct 23, 2023
@nolouch
Copy link
Contributor Author

nolouch commented Oct 23, 2023

/run-cherry-pick

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #7243.

ti-chi-bot bot pushed a commit that referenced this pull request Oct 25, 2023
close #7242

placement: add rule/group count metrics

Signed-off-by: nolouch <[email protected]>

Co-authored-by: nolouch <[email protected]>
rleungx pushed a commit to rleungx/pd that referenced this pull request Dec 1, 2023
close tikv#4399

placement: add rule/group count metrics

Signed-off-by: nolouch <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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.

add metrics about the count of placement
4 participants