MINOR: Remove clients test-fixtures shadow JAR rewire hack#22699
Open
m1a2st wants to merge 5 commits into
Open
MINOR: Remove clients test-fixtures shadow JAR rewire hack#22699m1a2st wants to merge 5 commits into
m1a2st wants to merge 5 commits into
Conversation
chia7712
reviewed
Jun 29, 2026
| ByteBuffer compressedPayload; | ||
| try { | ||
| compressedPayload = ClientTelemetryUtils.compress(payload, compressionType); | ||
| compressedPayload = ClientTelemetryUtils.compress(ByteBuffer.wrap(payload.toByteArray()), compressionType); |
Member
There was a problem hiding this comment.
We should avoid unnecessary memory copy here
chia7712
reviewed
Jun 30, 2026
| ByteBuffer compressedPayload; | ||
| try { | ||
| compressedPayload = ClientTelemetryUtils.compress(payload, compressionType); | ||
| compressedPayload = ClientTelemetryUtils.compress(payload.toByteArray(), compressionType); |
Member
There was a problem hiding this comment.
It still makes an unnecessary deep copy. Memory prices have been freaking high lately
Member
There was a problem hiding this comment.
Currently, ClientTelemetryUtils.compress is exposed for mocking and throwing an expected exception. We can mock Compression#of instead, and it works perfectly since ClientTelemetryUtils.compress uses it internally to create a Compression object.
Collaborator
Author
There was a problem hiding this comment.
Thanks, addressed it!
chia7712
reviewed
Jun 30, 2026
| return metricBuilder; | ||
| } | ||
|
|
||
| boolean hasSum() { |
Member
There was a problem hiding this comment.
Could you please add comments for those test-only methods?
chia7712
reviewed
Jun 30, 2026
| * | ||
| * @return resource attributes keyed by label name, preserving insertion order. | ||
| */ | ||
| Map<String, String> resourceLabels() { |
Member
There was a problem hiding this comment.
this method could be reused by updateLabels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the discussion:
#22201 (comment)
Reviewers: Chia-Ping Tsai chia7712@gmail.com