-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
KAFKA-9716: Clarify meaning of compression rate metrics #8664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch. Left a minor suggestion.
@@ -84,7 +84,7 @@ public SenderMetricsRegistry(Metrics metrics) { | |||
this.batchSizeMax = createMetricName("batch-size-max", | |||
"The max number of bytes sent per partition per-request."); | |||
this.compressionRateAvg = createMetricName("compression-rate-avg", | |||
"The average compression rate of record batches."); | |||
"The average compressed-to-uncompressed size ratio of record batches."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a little more verbose, but perhaps we could phrase it like this?
The average compression rate of record batches, defined as the average ratio of the compressed batch size over the uncompressed size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was in fact going for brevity with my approach, but if more detail will mean increased clarity for the user then I'm all for it. With the way you've defined it, I think there can be little question regarding the meaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the patch!
ok to test |
retest this please |
1 similar comment
retest this please |
There is some confusion over the compression rate metrics, as the meaning of the value isn't clearly stated in the metric description. In this case, it was assumed that a higher compression rate value meant better compression. This PR clarifies the meaning of the value, to prevent misunderstandings.
Alternative approaches that were considered were to either change the name of the metric or its implementation, but this would have a negative impact on those who are already making use of this metric.
Committer Checklist (excluded from commit message)