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

client: separate the metrics package #8833

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

JmPotato
Copy link
Member

What problem does this PR solve?

Issue Number: ref #8690.

What is changed and how does it work?

Separate the client metrics package.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added the component/client Client logic. label Nov 20, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Nov 20, 2024
@JmPotato JmPotato changed the title *: separate the client metrics package client: separate the client metrics package Nov 20, 2024
@JmPotato JmPotato changed the title client: separate the client metrics package client: separate the metrics package Nov 20, 2024
@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 20, 2024
@JmPotato
Copy link
Member Author

/cc @rleungx @lhy1024 @okJiang

@ti-chi-bot ti-chi-bot bot requested review from rleungx and lhy1024 November 20, 2024 09:24
Copy link
Contributor

ti-chi-bot bot commented Nov 20, 2024

@JmPotato: GitHub didn't allow me to request PR reviews from the following users: okJiang.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @rleungx @lhy1024 @okJiang

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.

@wuhuizuo
Copy link
Contributor

/cc @okJiang

Copy link
Contributor

ti-chi-bot bot commented Nov 21, 2024

@wuhuizuo: GitHub didn't allow me to request PR reviews from the following users: okJiang.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @okJiang

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.


func initCmdDurations() {
// WithLabelValues is a heavy operation, define variable to avoid call it every time.
CmdDurationTSOWait = cmdDuration.WithLabelValues("wait")
Copy link
Member

Choose a reason for hiding this comment

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

We can init them in L150-L199 directly

Copy link
Member Author

Choose a reason for hiding this comment

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

It is by design that we have a function to do this so we can call InitAndRegisterMetrics to reinitialize them with a client option.

@ti-chi-bot ti-chi-bot requested review from okJiang and removed request for okJiang November 21, 2024 11:29
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Nov 22, 2024
Signed-off-by: JmPotato <ghzpotato@gmail.com>
@JmPotato JmPotato force-pushed the independent_metrics branch from 639690c to c6931e5 Compare November 22, 2024 05:13
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 90.69767% with 20 lines in your changes missing coverage. Please review.

Project coverage is 75.31%. Comparing base (be4a366) to head (984aec0).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8833      +/-   ##
==========================================
+ Coverage   75.24%   75.31%   +0.07%     
==========================================
  Files         458      458              
  Lines       71300    71300              
==========================================
+ Hits        53650    53700      +50     
+ Misses      14236    14197      -39     
+ Partials     3414     3403      -11     
Flag Coverage Δ
unittests 75.31% <90.69%> (+0.07%) ⬆️

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

---- 🚨 Try these New Features:

@JmPotato JmPotato requested a review from okJiang November 22, 2024 06:48
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 22, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 22, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, rleungx

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

Copy link
Contributor

ti-chi-bot bot commented Nov 22, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-22 04:27:32.051440714 +0000 UTC m=+178639.671095234: ☑️ agreed by rleungx.
  • 2024-11-22 08:04:58.724591672 +0000 UTC m=+191686.344246185: ☑️ agreed by okJiang.

@okJiang
Copy link
Member

okJiang commented Nov 22, 2024

/retest

@ti-chi-bot ti-chi-bot bot merged commit 20c4157 into tikv:master Nov 22, 2024
25 checks passed
@JmPotato JmPotato deleted the independent_metrics branch November 22, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/client Client logic. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants