nodece commented on code in PR #25536:
URL: https://github.com/apache/pulsar/pull/25536#discussion_r3091369778


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java:
##########
@@ -432,8 +433,10 @@ public void testTopicAssignmentWithExistingBundles() 
throws Exception {
 
             long expectedValue = expectedAssignments[i];
             double variation = Math.abs(actualValue - expectedValue) * 100.0 / 
expectedValue;
-            log.info("Topic assignment - {}, actual: {}, expected baseline: 
{}, variation: {}/%",
-                    lookupAddresses[i], actualValue, expectedValue, 
String.format("%.2f", variation));
+            log.info().attr("address", lookupAddresses[i]).attr("actual", 
actualValue)
+                    .attr("expectedBaseline", expectedValue)
+                    .attr("variation", String.format("%.2f", variation))

Review Comment:
   **`"variation"` attr lost the `%` unit from the original `"variation: {}/% 
"` message.**
   
   Suggestion: rename the attr to make the unit self-documenting:
   ```suggestion
                       .attr("variationPct", String.format("%.2f", variation))
   ```



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