smiklosovic commented on code in PR #3373:
URL: https://github.com/apache/cassandra/pull/3373#discussion_r1637764082
##########
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;
Review Comment:
we have `org.apache.cassandra.io.util.FileUtils.ONE_MIB` to use. You would
just make double from it if necessary.
##########
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;
Review Comment:
@maoling we have `org.apache.cassandra.io.util.FileUtils.ONE_MIB` to use.
You would just make double from it if necessary.
--
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]