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

metrics: add metrics for active users count #59533

Merged
merged 31 commits into from
Feb 28, 2025

Conversation

tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #55563

Problem Summary:

What changed and how does it work?

Now privilege reload will load the active users instead of all users.
Add a metrics to see how many active users are there currently.

Check List

Tests

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

Load the tidb.json to grafana and check it works

image
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Copy link

ti-chi-bot bot commented Feb 14, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Feb 14, 2025
@tiancaiamao
Copy link
Contributor Author

The change is based on #59487
Wait for that PR to merge first.

@ti-chi-bot ti-chi-bot bot added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Feb 27, 2025
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 27, 2025
@tiancaiamao tiancaiamao marked this pull request as ready for review February 27, 2025 10:05
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 27, 2025
@tiancaiamao tiancaiamao requested a review from bb7133 February 27, 2025 10:05
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.4534%. Comparing base (67edd7d) to head (b8d50ab).
Report is 7 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59533        +/-   ##
================================================
+ Coverage   72.9760%   73.4534%   +0.4773%     
================================================
  Files          1699       1699                
  Lines        469387     470388      +1001     
================================================
+ Hits         342540     345516      +2976     
+ Misses       105739     103841      -1898     
+ Partials      21108      21031        -77     
Flag Coverage Δ
integration 42.8068% <0.0000%> (?)
unit 72.2672% <0.0000%> (+0.0890%) ⬆️

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

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 45.0712% <ø> (+0.0486%) ⬆️

@tiancaiamao
Copy link
Contributor Author

/test mysql-test

Copy link

tiprow bot commented Feb 28, 2025

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test mysql-test

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 kubernetes-sigs/prow repository.

Copy link
Member

@bb7133 bb7133 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 bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 28, 2025
Copy link

ti-chi-bot bot commented Feb 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bb7133, lcwangchao

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 28, 2025
Copy link

ti-chi-bot bot commented Feb 28, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-28 05:42:11.955081916 +0000 UTC m=+593679.908240182: ☑️ agreed by bb7133.
  • 2025-02-28 08:22:44.307708574 +0000 UTC m=+603312.260866835: ☑️ agreed by lcwangchao.

@tiancaiamao
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 28, 2025

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 kubernetes-sigs/prow repository.

@tiancaiamao
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Feb 28, 2025

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit 949fc53 into pingcap:master Feb 28, 2025
23 of 24 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this pull request Feb 28, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #59847.
But this PR has conflicts, please resolve them!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants