smiklosovic commented on code in PR #3373:
URL: https://github.com/apache/cassandra/pull/3373#discussion_r1637797371
##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -1415,6 +1416,17 @@ public void setCompactionThroughputMbPerSec(int value)
value, oldValue);
}
+ public Map<String, String> getCurrentCompactionThroughput()
+ {
+ HashMap<String, String> result = new LinkedHashMap<>();
+ Meter rate = CompactionManager.instance.getCompactionThroughput();
+ double mb = 1024.0 * 1024.0;
+ result.put("1minute", String.format("%.3f", rate.getOneMinuteRate() /
mb));
+ result.put("5minute", String.format("%.3f", rate.getFiveMinuteRate() /
mb));
+ result.put("15minute", String.format("%.3f",
rate.getFifteenMinuteRate() / mb));
Review Comment:
arent these technically mebibytes, not megabytes? 1024*1024 bytes is one
mebibyte, not megabyte, so the unit should be "mib"
--
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]