You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/05/13 23:57:08 UTC

[GitHub] [kafka] rgroothuijsen opened a new pull request #8664: KAFKA-9716: Clarify meaning of compression rate metrics

rgroothuijsen opened a new pull request #8664:
URL: https://github.com/apache/kafka/pull/8664


   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)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji commented on pull request #8664: KAFKA-9716: Clarify meaning of compression rate metrics

Posted by GitBox <gi...@apache.org>.
hachikuji commented on pull request #8664:
URL: https://github.com/apache/kafka/pull/8664#issuecomment-640947926






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji commented on a change in pull request #8664: KAFKA-9716: Clarify meaning of compression rate metrics

Posted by GitBox <gi...@apache.org>.
hachikuji commented on a change in pull request #8664:
URL: https://github.com/apache/kafka/pull/8664#discussion_r436403864



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/internals/SenderMetricsRegistry.java
##########
@@ -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.");

Review comment:
       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.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] rgroothuijsen commented on a change in pull request #8664: KAFKA-9716: Clarify meaning of compression rate metrics

Posted by GitBox <gi...@apache.org>.
rgroothuijsen commented on a change in pull request #8664:
URL: https://github.com/apache/kafka/pull/8664#discussion_r436973523



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/internals/SenderMetricsRegistry.java
##########
@@ -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.");

Review comment:
       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.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji merged pull request #8664: KAFKA-9716: Clarify meaning of compression rate metrics

Posted by GitBox <gi...@apache.org>.
hachikuji merged pull request #8664:
URL: https://github.com/apache/kafka/pull/8664


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org