[Enhancement] Add transmitted bytes to FE Auditlog
Why I'm doing:
I want to get how expensive a query is in terms of network usage quickly from the DD log instead of from the query profile. The enhancement can allow us to find out which queries that take the most network resources easily from the DD log. Otherwise, we can only get the most network usage queries by checking out all the query profiles individually.
What I'm doing:
I tried to add the transmitted bytes into the FE AuditLog. I open the PR for review ignoring the test coverage CI since I cannot figure out how to add unit tests for the AuditLog.
What type of PR is this:
- [ ] BugFix
- [ ] Feature
- [x] Enhancement
- [ ] Refactor
- [ ] UT
- [ ] Doc
- [ ] Tool
Does this PR entail a change in behavior?
- [x] Yes, this PR will result in a change in behavior.
- [ ] No, this PR will not result in a change in behavior.
If yes, please specify the type of change:
- [x] Interface/UI changes: syntax, type conversion, expression evaluation, display information
- [ ] Parameter changes: default values, similar parameters but with different default values
- [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
- [ ] Feature removed
- [ ] Miscellaneous: upgrade & downgrade compatibility, etc.
Checklist:
- [ ] I have added test cases for my bug fix or my new feature
- [ ] This pr needs user documentation (for new or modified features or behaviors)
- [ ] I have added documentation for my new feature or new function
- [ ] This is a backport pr
Bugfix cherry-pick branch check:
- [x] I have checked the version labels which the pr will be auto-backported to the target branch
- [ ] 3.5
- [ ] 3.4
- [x] 3.3
- [ ] 3.2
- [ ] 3.1
Quality Gate passed
Issues
2 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
[Java-Extensions Incremental Coverage Report]
:white_check_mark: pass : 0 / 0 (0%)
[FE Incremental Coverage Report]
:white_check_mark: pass : 12 / 14 (85.71%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | com/starrocks/common/util/AuditStatisticsUtil.java | 5 | 7 | 71.43% | [95, 155] |
| :large_blue_circle: | com/starrocks/plugin/AuditEvent.java | 6 | 6 | 100.00% | [] |
| :large_blue_circle: | com/starrocks/qe/StmtExecutor.java | 1 | 1 | 100.00% | [] |
[BE Incremental Coverage Report]
:white_check_mark: pass : 38 / 38 (100.00%)
file detail
| path | covered_line | new_line | coverage | not_covered_line_detail | |
|---|---|---|---|---|---|
| :large_blue_circle: | be/src/exec/pipeline/exchange/exchange_sink_operator.cpp | 7 | 7 | 100.00% | [] |
| :large_blue_circle: | be/src/runtime/query_statistics.h | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | be/src/exec/pipeline/exchange/sink_buffer.h | 5 | 5 | 100.00% | [] |
| :large_blue_circle: | be/src/exec/pipeline/query_context.h | 2 | 2 | 100.00% | [] |
| :large_blue_circle: | be/src/runtime/query_statistics.cpp | 8 | 8 | 100.00% | [] |
| :large_blue_circle: | be/src/exec/pipeline/exchange/sink_buffer.cpp | 11 | 11 | 100.00% | [] |
| :large_blue_circle: | be/src/exec/pipeline/exchange/exchange_sink_operator.h | 1 | 1 | 100.00% | [] |
| :large_blue_circle: | be/src/exec/pipeline/query_context.cpp | 3 | 3 | 100.00% | [] |
@Mergifyio backport branch-3.3
backport branch-3.3
✅ Backports have been created
- #60211 [Enhancement] Add transmitted bytes to FE Auditlog (backport #58346) has been created for branch
branch-3.3but encountered conflicts
ignore merge 3.4.5
ignore backport check: 3.4.5
@Mergifyio backport branch-3.5 branch-3.4
backport branch-3.5 branch-3.4
✅ Backports have been created
- #60314 [Enhancement] Add transmitted bytes to FE Auditlog (backport #58346) has been created for branch
branch-3.5but encountered conflicts - #60315 [Enhancement] Add transmitted bytes to FE Auditlog (backport #58346) has been created for branch
branch-3.4but encountered conflicts