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: refactor intercepted client #1557

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

zyguan
Copy link
Contributor

@zyguan zyguan commented Jan 15, 2025

Do not wrap resouce control logic into an interceptor to reduce overhead.

# This PR:  overhead 2.27%
0.11s 0.035% 0.035%     31.90s 10.15%  github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest
0.32s   0.1%  0.14%     24.79s  7.88%  github.com/pingcap/tidb/pkg/store/driver.(*injectTraceClient).SendRequest

# Baseline: overhead 2.92%
0.08s 0.025% 0.025%     33.97s 10.59%  github.com/tikv/client-go/v2/internal/client.interceptedClient.SendRequest
0.30s 0.094%  0.18%     24.61s  7.67%  github.com/pingcap/tidb/pkg/store/driver.(*injectTraceClient).SendRequest
Workload Threads QPS (this PR) QPS (baseline) Diff
pointget 64 87831.47 86159.20 1.9%
batchget 64 22290.08 22037.33 1.1%

@ti-chi-bot ti-chi-bot bot added dco-signoff: yes Indicates the PR's author has signed the dco. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 15, 2025
Signed-off-by: zyguan <[email protected]>
@zyguan
Copy link
Contributor Author

zyguan commented Jan 15, 2025

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 16, 2025
@ti-chi-bot ti-chi-bot bot added the lgtm label Jan 16, 2025
Copy link

ti-chi-bot bot commented Jan 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfzjywxk, nolouch

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 approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 16, 2025
Copy link

ti-chi-bot bot commented Jan 16, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-16 08:33:25.428027834 +0000 UTC m=+193876.883073983: ☑️ agreed by nolouch.
  • 2025-01-16 09:17:51.094363572 +0000 UTC m=+196542.549409722: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit e9d868c into tikv:master Jan 16, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants