erobot commented on code in PR #15304:
URL: https://github.com/apache/pulsar/pull/15304#discussion_r857577704


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java:
##########
@@ -254,7 +254,7 @@ public double convertBy(double usageBytes) {
 
     @AllArgsConstructor
     public enum UsageUnit {
-        Kbps(8 / 1024);
+        Kbps(1024);

Review Comment:
   
https://github.com/apache/pulsar/blob/35c4b68f586774d0e2b7a3a2a6ab1d6a20ac1452/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java#L114-L115
   
   From this codes, usage and limit should have the same unit kbps so I thought 
this should be bit and usageBytes*8/1000. 
   
   By the way, UsageUnit.Kbps is somewhat misleading. It used to convert 
usageBytes but usageBytes's is size(byte) but not speed(kbps).



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to