metrics(ticdc): Fix kafka compress ratio issue (#11313)
This is an automated cherry-pick of #11313
What problem does this PR solve?
Issue Number: close #11314
What is changed and how it works?
follow the kafka producer compression ratio definition: https://pkg.go.dev/github.com/IBM/sarama#section-readme
compression ratio = Size of original data / Size of compressed data * 100
Check List
Tests
- Unit test
- Integration test
- Manual test (add detailed scripts or steps below)
- No code
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
`None`.
Codecov Report
Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
Please upload report for BASE (
release-8.1@20ee93f). Learn more about missing BASE report.
Additional details and impacted files
| Components | Coverage Δ | |
|---|---|---|
| cdc | 61.9870% <0.0000%> (?) |
|
| dm | 51.3677% <0.0000%> (?) |
|
| engine | 63.4373% <0.0000%> (?) |
| Flag | Coverage Δ | |
|---|---|---|
| unit | 57.6190% <0.0000%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
@@ Coverage Diff @@
## release-8.1 #11327 +/- ##
================================================
Coverage ? 57.6190%
================================================
Files ? 853
Lines ? 126125
Branches ? 0
================================================
Hits ? 72672
Misses ? 48048
Partials ? 5405
/retest
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: 3AceShowHand
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [3AceShowHand]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/retest
/retest
/retest
@ti-chi-bot: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-cdc-integration-storage-test | f00f8116fc7bc5b34e3d35f37ee0c04eeaeafe00 | link | true | /test cdc-integration-storage-test |
Full PR test history. Your PR dashboard.
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/test-infra repository. I understand the commands that are listed here.
/retest