smiklosovic commented on code in PR #3373:
URL: https://github.com/apache/cassandra/pull/3373#discussion_r1637797924
##########
src/java/org/apache/cassandra/tools/nodetool/GetCompactionThroughput.java:
##########
@@ -38,13 +40,18 @@ public void execute(NodeProbe probe)
double throughput = probe.getCompactionThroughputMebibytesAsDouble();
if (compactionThroughputAsDouble)
- probe.output().out.println("Current compaction throughput: " +
throughput + " MiB/s");
+ probe.output().out.println("Current compaction throughput limit: "
+ throughput + " MiB/s");
else
{
if (!DoubleMath.isMathematicalInteger(throughput))
throw new RuntimeException("Use the -d flag to quiet this
error and get the exact throughput in MiB/s");
- probe.output().out.println("Current compaction throughput: " +
probe.getCompactionThroughput() + " MB/s");
+ probe.output().out.println("Current compaction throughput limit: "
+ probe.getCompactionThroughput() + " MB/s");
}
+
+ Map<String, String> currentCompactionThroughputMetricsMap =
probe.getCurrentCompactionThroughput();
Review Comment:
`MiB/s`
##########
test/unit/org/apache/cassandra/tools/nodetool/CompactionStatsTest.java:
##########
@@ -140,6 +140,9 @@ compactionId, OperationType.COMPACTION, CQLTester.KEYSPACE,
currentTable(), byte
assertThat(stdout).containsPattern("15 minute
rate\\s+[0-9]*.[0-9]*[0-9]*/minute");
assertThat(stdout).containsPattern("mean
rate\\s+[0-9]*.[0-9]*[0-9]*/hour");
assertThat(stdout).containsPattern("compaction throughput
\\(MiB/s\\)\\s+throttling disabled \\(0\\)");
+ assertThat(stdout).containsPattern("current compaction throughput \\(1
minute\\)\\s+[0-9]*.[0-9]*[0-9]* MB/s");
Review Comment:
`MiB/s`
##########
test/unit/org/apache/cassandra/tools/nodetool/SetGetCompactionThroughputTest.java:
##########
@@ -81,6 +81,17 @@ public void testUnparseable()
assertPreciseMibFlagNeeded();
}
+ @Test
+ public void testCurrentCompactionThroughput()
+ {
+ ToolResult tool = invokeNodetool("getcompactionthroughput");
+ tool.assertOnCleanExit();
+
+ assertThat(tool.getStdout()).containsPattern("Current compaction
throughput \\(1 minute\\): \\d+\\.\\d+ MB/s");
Review Comment:
`MiB/s`
--
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]