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

filter: replace fmt.Sprint with strconv.parseUint64 #4010

Merged
merged 3 commits into from
Aug 20, 2021

Conversation

bufferflies
Copy link
Contributor

Signed-off-by: bufferflies 1045931706@qq.com

What problem does this PR solve?

related #3744, repalce fmt.Sprintf with strconv.ParseUint to imporve filter performance .

image

What is changed and how it works?

some itoa test: https://gist.github.com/evalphobia/caee1602969a640a4530

Check List

Tests

  • bench test

Code changes

Side effects

Related changes

Release note

replace fmt.Sprint with strconv.parseUint64

Signed-off-by: bufferflies <1045931706@qq.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 19, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • disksing
  • 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 the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 19, 2021
@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #4010 (3be5173) into master (550cf1c) will increase coverage by 0.17%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4010      +/-   ##
==========================================
+ Coverage   74.50%   74.68%   +0.17%     
==========================================
  Files         255      255              
  Lines       25831    25831              
==========================================
+ Hits        19246    19292      +46     
+ Misses       4860     4830      -30     
+ Partials     1725     1709      -16     
Flag Coverage Δ
unittests 74.68% <83.33%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
server/schedule/filter/filters.go 90.69% <83.33%> (ø)
server/tso/local_allocator.go 71.62% <0.00%> (-6.76%) ⬇️
server/election/leadership.go 83.90% <0.00%> (-3.45%) ⬇️
client/client.go 71.54% <0.00%> (-0.14%) ⬇️
server/grpc_service.go 47.23% <0.00%> (+0.22%) ⬆️
pkg/btree/btree.go 86.74% <0.00%> (+0.96%) ⬆️
server/tso/allocator_manager.go 69.44% <0.00%> (+1.16%) ⬆️
server/election/lease.go 96.61% <0.00%> (+1.69%) ⬆️
client/base_client.go 84.37% <0.00%> (+2.08%) ⬆️
pkg/dashboard/adapter/manager.go 85.10% <0.00%> (+2.12%) ⬆️
... and 5 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 550cf1c...3be5173. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2021
@rleungx
Copy link
Member

rleungx commented Aug 20, 2021

There are some other codes using Sprintf too and how about replacing them all?

@bufferflies
Copy link
Contributor Author

There are some other codes using Sprintf too and how about replacing them all?

yes, there are some reference Sprintf in other codes, it will be solved all in uncorrelated issue.

@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 Aug 20, 2021
@disksing
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@disksing: 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: 0dc15d0

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

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

1 similar comment
@ti-chi-bot
Copy link
Member

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

@nolouch
Copy link
Contributor

nolouch commented Aug 20, 2021

/merge

@ti-chi-bot
Copy link
Member

@nolouch: 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 ti-chi-bot merged commit 81e7bd0 into tikv:master Aug 20, 2021
@bufferflies bufferflies deleted the feature/replaceFmt branch February 17, 2022 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants