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

core: reduce log zap cpu time #5859

Merged
merged 2 commits into from Jan 16, 2023
Merged

core: reduce log zap cpu time #5859

merged 2 commits into from Jan 16, 2023

Conversation

lhy1024
Copy link
Contributor

@lhy1024 lhy1024 commented Jan 12, 2023

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

What problem does this PR solve?

This pr avoid zap before passing the reference but we need a better way to reduce zap cpu time

Issue Number: Ref #5692
image

What is changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 12, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • HunDunDM
  • nolouch

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.

@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Base: 75.42% // Head: 75.46% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (f6a15ca) compared to base (be017f9).
Patch coverage: 60.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5859      +/-   ##
==========================================
+ Coverage   75.42%   75.46%   +0.04%     
==========================================
  Files         337      337              
  Lines       34123    34129       +6     
==========================================
+ Hits        25736    25757      +21     
+ Misses       6163     6151      -12     
+ Partials     2224     2221       -3     
Flag Coverage Δ
unittests 75.46% <60.00%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
pkg/core/region.go 88.97% <60.00%> (-1.17%) ⬇️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
pkg/utils/etcdutil/etcdutil.go 84.88% <0.00%> (-3.49%) ⬇️
pkg/storage/kv/etcd_kv.go 72.22% <0.00%> (-3.18%) ⬇️
server/schedule/hbstream/heartbeat_streams.go 78.78% <0.00%> (-2.03%) ⬇️
server/tso/allocator_manager.go 63.22% <0.00%> (-1.62%) ⬇️
tools/pd-ctl/pdctl/command/operator.go 66.66% <0.00%> (-1.15%) ⬇️
pkg/btree/btree_generic.go 86.34% <0.00%> (-0.93%) ⬇️
server/region_syncer/client.go 85.82% <0.00%> (-0.75%) ⬇️
server/schedule/operator/step.go 76.76% <0.00%> (-0.69%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bufferflies
Copy link
Contributor

how about move it to the github.com/pingcap/log repo?

@rleungx
Copy link
Member

rleungx commented Jan 13, 2023

Please add a benchmark for it, not only the profile.

@lhy1024
Copy link
Contributor Author

lhy1024 commented Jan 13, 2023

how about move it to the github.com/pingcap/log repo?

good idea

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 13, 2023
@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 Jan 16, 2023
@nolouch
Copy link
Contributor

nolouch commented Jan 16, 2023

/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
Copy link
Member

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

Commit hash: ab9b940

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

@lhy1024: Your PR was out of date, I have automatically updated it for you.

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.

@lhy1024 lhy1024 added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 16, 2023
Signed-off-by: lhy1024 <admin@liudos.us>
Signed-off-by: lhy1024 <admin@liudos.us>
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Jan 16, 2023
@lhy1024 lhy1024 removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 16, 2023
@lhy1024
Copy link
Contributor Author

lhy1024 commented Jan 16, 2023

/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: f6a15ca

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 16, 2023
@ti-chi-bot ti-chi-bot merged commit 5573d67 into tikv:master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none 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.

None yet

6 participants