zaaath commented on code in PR #2919:
URL: https://github.com/apache/cassandra/pull/2919#discussion_r1398621011
##########
src/java/org/apache/cassandra/utils/FBUtilities.java:
##########
@@ -865,6 +865,49 @@ public static String prettyPrintMemory(long size)
return prettyPrintMemory(size, "");
}
+ /**
+ * Formats a latency value in milliseconds for display, appending an "ms"
suffix.
+ * The formatted output is rounded to three decimal places.
+ * For example, "5000.000 ms", "100.000 ms", "0.050 ms", "0.000 ms", "NaN
ms".
+ * @param latency Latency in milliseconds to print.
+ */
+ public static String prettyPrintLatency(double latency)
+ {
+ return String.format("%.3f ms", latency);
+ }
+
+ /**
+ * Formats a ratio value for display, rounds it to three decimal places.
+ * For example, "10.000", "1.000", "0.050", "0.001", "0.000", "NaN".
+ * @param ratioObj Ratio to print.
+ */
+ public static String prettyPrintRatio(Object ratioObj)
Review Comment:
@smiklosovic sure, working on that.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]