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

backend, net: track traffic for each client connection #178

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #175

Problem Summary:
Track traffic for each client (frontend) connection.

What is changed and how it works:

  • Track traffic for PacketIO
  • Add ClientIO as a member to BackendConnMgr to make track easier
  • Add InBytes() and OutBytes for ConnContext

Check List

Tests

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

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has tiproxyctl change
  • Other user behavior changes

Release note

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

None

@djshow832 djshow832 requested a review from xhebox January 9, 2023 07:49
pkg/proxy/backend/handshake_handler.go Outdated Show resolved Hide resolved
@djshow832 djshow832 merged commit ef3f28b into pingcap:main Jan 9, 2023
@djshow832 djshow832 deleted the track_traffic branch January 9, 2023 08:21
xhebox pushed a commit to xhebox/TiProxy that referenced this pull request Mar 7, 2023
xhebox pushed a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Track in/out network traffic for each connection
2 participants